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

Kevin Rushforth kcr at openjdk.org
Sat May 20 13:05:00 UTC 2023


On Fri, 19 May 2023 00:10:25 GMT, John Hendrikx <jhendrikx 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.
>
> John Hendrikx has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains three new commits since the last revision:
> 
>  - Add tests from #1076
>  - Merge remote-tracking branch 'upstream/master' into feature/remove-private-api-in-css
>  - Fix possible regression

> I've done some Googling with `"getPseudoClasses" import javafx`, and also looked at several code search sites, and if it's used, then I can't find any examples at all. I also searched for `createMatch`, with similar results, no uses outside the JavaFX code base.
> ...
> There's not a lot of reason to call `getPseudoClassStates` -- the method is mainly public so internal code outside its the public package can reach these to do the actual matching logic.

This is what I would have expected as well. I'll do some additional searching as well, but, as of now, I think we can proceed down the current path and live with the incompatibility.

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

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


More information about the openjfx-dev mailing list