Bug 188604 - WeakListeners.propertyChange should support property name variant
WeakListeners.propertyChange should support property name variant
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: -- Other --
7.0
All All
: P3 (vote)
: Dev
Assigned To: Martin Entlicher
issues@platform
: API, API_REVIEW_FAST
Depends on:
Blocks:
  Show dependency treegraph
 
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
:


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.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo