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

John Hendrikx jhendrikx at openjdk.org
Thu Mar 30 10:04:35 UTC 2023


On Mon, 27 Mar 2023 15:07:52 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.
>
> This was clearly a mistake back when the public API was first created in JDK 9.

@kevinrushforth I've created the CSR for this.  Can I move it to proposed?

Also, I've been looking into https://bugs.openjdk.org/browse/JDK-8199216 which sees excessive use of `PseudoClassState` instances (and I see this even under more "normal" circumstances as well).  I've got a fix for this issue which involves making use of an immutable variant of `PseudoClassState` (as almost 99% of all the instances are never mutated, but must be copied just in case they are). 

This change would need to go in first though to make this possible.

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

PR Comment: https://git.openjdk.org/jfx/pull/1070#issuecomment-1490030627


More information about the openjfx-dev mailing list