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

John Hendrikx jhendrikx at openjdk.org
Wed May 17 22:02:56 UTC 2023


On Wed, 17 May 2023 21:13:46 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

>> 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
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/BitSet.java line 266:
> 
>> 264:     @Override
>> 265:     public boolean addAll(Collection<? extends T> c) {
>> 266:         if (this.getClass() != c.getClass()) {
> 
> same, handling of the null 'c' argument.
> I wonder if this is intended behavior?

I doubt the `Set` contract was breached here on purpose. More likely, the original implementation was never exposed, or the original developer didn't realize that `Set` has a very specific contract that you must follow, or it won't interact well with other collections.

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

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


More information about the openjfx-dev mailing list