RFR: 8214699: Node.getPseudoClassStates must return the same instance on every call [v2]
Ambarish Rapte
arapte at openjdk.java.net
Tue Jun 23 10:33:05 UTC 2020
> Node.getPseudoClassStates() returns a new UnmodifiableObservableSet of PseudoClassState on each call. So in order to
> listen to any changes in this set, user must call the method Node.getPseudoClassStates() only once and keep a strong
> reference to the returned UnmodifiableObservableSet.
>
> So the fix is that the method Node.getPseudoClassStates() should return the same UnmodifiableObservableSet on every
> call. As the returned set is an UnmodifiableObservableSet, it will not have any impact on it's usage.
>
> Added a small unit test. and,
> Altered(minor) a test which was modified in
> past(https://github.com/openjdk/jfx/commit/0ac98695a1b11443c342fad4f009d6e03a052522)
> (https://github.com/openjdk/jfx/commit/62323e0a9c5817b33daa262d6914eba0e8d274ff) along with this method and should be
> updated in view of this change.
Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:
review corrections
-------------
Changes:
- all: https://git.openjdk.java.net/jfx/pull/253/files
- new: https://git.openjdk.java.net/jfx/pull/253/files/2c4cbfba..7eac1d30
Webrevs:
- full: https://webrevs.openjdk.java.net/jfx/253/webrev.01
- incr: https://webrevs.openjdk.java.net/jfx/253/webrev.00-01
Stats: 77 lines in 4 files changed: 75 ins; 0 del; 2 mod
Patch: https://git.openjdk.java.net/jfx/pull/253.diff
Fetch: git fetch https://git.openjdk.java.net/jfx pull/253/head:pull/253
PR: https://git.openjdk.java.net/jfx/pull/253
More information about the openjfx-dev
mailing list