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.

Bug 35726

Summary: WeakListeners.create should accept a remove method name
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: Jaroslav Tulach <jtulach>
Status: VERIFIED FIXED    
Severity: blocker CC: dstrupl
Priority: P3 Keywords: API
Version: 3.x   
Hardware: All   
OS: All   
URL: http://www.netbeans.org/unbranded-source/browse/~checkout~/contrib/bookmarks/src/org/netbeans/modules/bookmarks/ObjectChangeWeakListener.java?content-type=text/plain
Issue Type: DEFECT Exception Reporter:

Description Jesse Glick 2003-08-22 16:47:57 UTC
Since it is not guaranteed that a remove method
will be "remove" + unqualified class name of the
listener interface; e.g.
removeNamingListener(ObjectChangeListener). Old
WeakListener permitted removeMethodName to be
overridden when subclassing, but when using the
new factory method there needs to be some
equivalent. (Marking DEFECT because of loss of
functionality in nondeprecated API.)
Comment 1 Jaroslav Tulach 2003-09-02 10:25:12 UTC
I am going to solve it by adding a method 

WeakListeners.create (listenerType, apiType, listener, source)

so for in JNDI one could use:

WeakListeners.create (ObjectTypeListener, NamingListener, l, null)

this seems to me easier than just a method name, as I would still had
to specify the type of argument the method name should look for.
Comment 2 Jaroslav Tulach 2003-09-02 11:33:54 UTC
Checking in api/doc/changes/apichanges.xml;
/cvs/openide/api/doc/changes/apichanges.xml,v  <--  apichanges.xml
new revision: 1.166; previous revision: 1.165
done
Processing log script arguments...
More commits to come...
Checking in src/org/openide/filesystems/FileObject.java;
/cvs/openide/src/org/openide/filesystems/FileObject.java,v  <-- 
FileObject.java
new revision: 1.79; previous revision: 1.78
done
Checking in src/org/openide/filesystems/MultiFileObject.java;
/cvs/openide/src/org/openide/filesystems/MultiFileObject.java,v  <-- 
MultiFileObject.java
new revision: 1.113; previous revision: 1.112
done
Processing log script arguments...
More commits to come...
Checking in src/org/openide/util/Utilities.java;
/cvs/openide/src/org/openide/util/Utilities.java,v  <--  Utilities.java
new revision: 1.135; previous revision: 1.134
done
Checking in src/org/openide/util/WeakListenerImpl.java;
/cvs/openide/src/org/openide/util/WeakListenerImpl.java,v  <-- 
WeakListenerImpl.java
new revision: 1.5; previous revision: 1.4
done
Checking in src/org/openide/util/WeakListeners.java;
/cvs/openide/src/org/openide/util/WeakListeners.java,v  <-- 
WeakListeners.java
new revision: 1.3; previous revision: 1.2
done
Processing log script arguments...
More commits to come...
RCS file:
/cvs/openide/test/unit/src/org/openide/util/WeakListenersTest.java,v
done
Checking in test/unit/src/org/openide/util/WeakListenersTest.java;
/cvs/openide/test/unit/src/org/openide/util/WeakListenersTest.java,v 
<--  WeakListenersTest.java
initial revision: 1.1
done
Comment 3 Marian Mirilovic 2005-07-15 07:44:22 UTC
closed