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:09 UTC 2020


On Mon, 22 Jun 2020 11:50:05 GMT, Jeanette Winzenburg <fastegal at openjdk.org> wrote:

>> Ambarish Rapte has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   review corrections
>
> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 9375:
> 
>> 9374:     public final ObservableSet<PseudoClass> getPseudoClassStates() {
>> 9375:
>> 9376:         return FXCollections.unmodifiableObservableSet(pseudoClassStates);
> 
> missing override annotation (says my IDE :) - not entirely certain about guidelines here: it was missing before as
> well, but now might be a good time to fix it (except if we generally leave such cleanup to a dedicated cleanup commit)

Corrected in the next commit, please take a look.

> modules/javafx.graphics/src/main/java/javafx/scene/Node.java line 9371:
> 
>> 9370:     final ObservableSet<PseudoClass> unmodifiablePseudoClassStates =
>> 9371:             FXCollections.unmodifiableObservableSet(pseudoClassStates);
>> 9372:     /**
> 
> the unmodifiable field can be private, or is there any reason for being package?

It is not required to be package, changed it to private.

-------------

PR: https://git.openjdk.java.net/jfx/pull/253


More information about the openjfx-dev mailing list