This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
final void addFileChangeListener (FileChangeListener fcl) { if (listeners == null) { synchronized (getClass ()) { if (listeners == null) { listeners = new EventListenerList (); } } } listeners.add (FileChangeListener.class, fcl); } Suggest simply final synchronized void addFileChangeListener (FileChangeListener fcl) { if (listeners == null) { listeners = new EventListenerList (); } listeners.add (FileChangeListener.class, fcl); } Same in removeFileChangeListener, and in dispatchEvent, synchronize on this just during the first two lines: final void dispatchEvent (FileEvent fe, int operation) { Object[] fcls; synchronized (this) { if (listeners == null) return; fcls = listeners.getListenerList(); } // as before
Fixed in trunk according to suggestion. RCS file: /cvs/openide/src/org/openide/filesystems/FCLSupport.java,v new revision 1.5; pervious revision 1.4
closed