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 - WeakListeners.propertyChange should support property name variant
Summary: WeakListeners.propertyChange should support property name variant
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords: API, API_REVIEW_FAST
Depends on:
Blocks:
 
Reported: 2010-07-12 20:19 UTC by Jesse Glick
Modified: 2014-10-29 11:40 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
The proposed API change, test included. (15.53 KB, patch)
2014-10-15 09:43 UTC, Martin Entlicher
Details | Diff

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