RFR: JDK-8304959: Public API in javafx.css.Match should not return private API class PseudoClassState [v7]
Andy Goryachev
angorya at openjdk.org
Thu May 18 23:22:57 UTC 2023
On Fri, 12 May 2023 23:40:03 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 updated the pull request incrementally with three additional commits since the last revision:
>
> - Override hashCode with a comment explaining why
> - Fix style issues
> - Restore removed public method
My concern is that replacing == with .equals() in BitSet.equals() may lead to issues in internal CSS code. It is highly unlikely that application would extend BitSet, or put StyleClassSet in the same hash table due to both being in com.sun; but the internal code might (and I don't want to comb the CSS code looking for possible occurrences).
If we replace line 532 with `if(getClass == obj.getClass()) {` however, we would not have to.
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1070#issuecomment-1553773863
More information about the openjfx-dev
mailing list