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 188604

Summary: WeakListeners.propertyChange should support property name variant
Product: platform Reporter: Jesse Glick <jglick>
Component: -- Other --Assignee: Martin Entlicher <mentlicher>
Status: RESOLVED FIXED    
Severity: normal Keywords: API, API_REVIEW_FAST
Priority: P3    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: The proposed API change, test included.

Description Jesse Glick 2010-07-12 20:19:28 UTC
If you add a property change listener using WeakListeners.propertyChange, you cannot use addPropertyChangeListener(String,PropertyChangeListener) since WeakListenerImpl.PropertyChange will call removePropertyChangeListener(PropertyChangeListener) and PropertyChangeSupport will not find the listener. There should be a variant method WeakListeners.propertyChange(PropertyChangeListener,Object,String) which lets you specify the property name you are adding the listener under.
Comment 1 Martin Entlicher 2014-10-15 09:22:59 UTC
I'm missing this as well.
Comment 2 Martin Entlicher 2014-10-15 09:43:37 UTC
Created attachment 149913 [details]
The proposed API change, test included.
Comment 3 Martin Entlicher 2014-10-15 09:44:33 UTC
Please review the proposed API change.
Comment 4 Jaroslav Tulach 2014-10-16 10:57:53 UTC
Seems OK.
Comment 5 Martin Entlicher 2014-10-21 15:48:48 UTC
Thanks for the review, I'm going to push the change tomorrow.
Comment 6 Martin Entlicher 2014-10-22 11:30:25 UTC
The change was adapted to reflect the changes introduced by the merge of server_split branch and pushed:
http://hg.netbeans.org/core-main/rev/244307f75984
Comment 7 Quality Engineering 2014-10-29 11:40:33 UTC
Integrated into 'main-silver', will be available in build *201410290913* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/244307f75984
User: mentlicher@netbeans.org
Log: #188604: Weak property and vetoable listeners for a specific property name.