Sometimes you need to figure out if a listeners is already attached to property/observableValue or not.
Adding a getListeners() method as suggested in http://javafx-jira.kenai.com/browse/RT-16363 is not an option as internal listeners may be leaked out.
The alternative would be to add a hasListener(Listener) method.
This issue was brought forward during informal discussions with the JavaFX team during JavaOne 2012.
Adding a getListeners() method as suggested in http://javafx-jira.kenai.com/browse/RT-16363 is not an option as internal listeners may be leaked out.
The alternative would be to add a hasListener(Listener) method.
This issue was brought forward during informal discussions with the JavaFX team during JavaOne 2012.
- duplicates
-
JDK-8102584 Add method getListeners in ObservableValue class.
- Closed
- relates to
-
JDK-8103474 removeListener removes all occurences of given listener
- Closed
-
JDK-8097929 [Base] ObservableValue.addListener allows duplicates
- Closed