On Sun, 16 Apr 2023 03:57:39 GMT, Michael Strauß <mstra...@openjdk.org> wrote:
>> John Hendrikx has updated the pull request incrementally with two additional >> commits since the last revision: >> >> - Improve generics on ObservableValueBase >> - Improve generics > > modules/javafx.base/src/main/java/com/sun/javafx/binding/OldValueCachingListenerList.java > line 101: > >> 99: * notification otherwise {@code false} >> 100: */ >> 101: public boolean notifyListeners(ObservableValue<T> observableValue) { > > The code in this method is _almost_ identical to > `ListenerList.notifyListeners(ObservableValue<T>, T)`. > Given that this method is somewhat complex, I think it would be good to use a > common implementation. > This will help with code review, and decrease the chance that both methods > diverge further with future modifications. I agree with you there, and I've been looking what would be a good way to achieve this. I will take another look soon. My primary concern is that this is a somewhat critical path, and I would want to ensure that it doesn't cause too much performance regressions (I've already been optimizing all of this code with the help of a JMH test) ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1081#discussion_r1167754712