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 - WeakListeners.create should accept a remove method name
Summary: WeakListeners.create should accept a remove method name
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jaroslav Tulach
URL: http://www.netbeans.org/unbranded-sou...
Keywords: API
Depends on:
Blocks:
 
Reported: 2003-08-22 16:47 UTC by Jesse Glick
Modified: 2008-12-22 20:46 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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