RFR: JDK-8304959: Public API in javafx.css.Match should not return private API class PseudoClassState

Kevin Rushforth kcr at openjdk.org
Thu Mar 30 22:37:27 UTC 2023


On Thu, 30 Mar 2023 22:32:17 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:

>> The class `PseudoClassState` is private API, but was exposed erroneously in the CSS API. Instead, `Set<PseudoClass>` should have been used. This PR corrects this.
>
> modules/javafx.graphics/src/main/java/javafx/css/Match.java line 43:
> 
>> 41: 
>> 42:     final Selector selector;
>> 43:     final Set<PseudoClass> pseudoClasses;
> 
> Should this be an `ObservableSet`? Changing the type to the `Set` superclass will mean that applications would need to do an `instanceof` check to know whether it was observable or not?

Btw, I meant to add this comment on the public getter method.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1070#discussion_r1153852490


More information about the openjfx-dev mailing list