[libbluray-devel] HScene: remove incorrect synchronized() {}
hpi1
git at videolan.org
Wed Aug 27 10:48:46 CEST 2014
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Wed Aug 27 10:06:46 2014 +0300| [80342e5ea3a616330c80cc7df3621c43c3574884] | committer: hpi1
HScene: remove incorrect synchronized() {}
- Synchronizing linked list add/remove against linked list head is useless (head element can change).
- List usage was not synchronized.
- HAVi does not require [add/remove]WindowListener to be thread safe.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=80342e5ea3a616330c80cc7df3621c43c3574884
---
src/libbluray/bdj/java/org/havi/ui/HScene.java | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/libbluray/bdj/java/org/havi/ui/HScene.java b/src/libbluray/bdj/java/org/havi/ui/HScene.java
index 372ad05..52888b6 100644
--- a/src/libbluray/bdj/java/org/havi/ui/HScene.java
+++ b/src/libbluray/bdj/java/org/havi/ui/HScene.java
@@ -181,15 +181,11 @@ public class HScene extends Container implements HComponentOrdering {
}
public void addWindowListener(WindowListener listener) {
- synchronized (windowListener) {
- windowListener = HEventMulticaster.add(windowListener, listener);
- }
+ windowListener = HEventMulticaster.add(windowListener, listener);
}
public void removeWindowListener(WindowListener listener) {
- synchronized (windowListener) {
- windowListener = HEventMulticaster.remove(windowListener, listener);
- }
+ windowListener = HEventMulticaster.remove(windowListener, listener);
}
protected void processWindowEvent(WindowEvent event) {
More information about the libbluray-devel
mailing list