On Tue, 28 May 2024 09:43:28 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> John Hendrikx has updated the pull request with a new target base due to a 
>> merge or a rebase. The pull request now contains 21 commits:
>> 
>>  - Merge branch 'openjdk:master' into 
>> feature/selector-performance-improvement
>>  - Merge remote-tracking branch 'upstream/master' into 
>> feature/selector-performance-improvement
>>  - Added 100% coverage test for FixedCapacitySet
>>  - Move getStyleClassNames to location it was introduced to reduce diff
>>  - Remove deprecations
>>  - Add @Deprecated tag
>>  - Remove commented code in BitSetTest
>>  - Remove unnecessary addAll overrides
>>  - Optimize performance of OpenAddressed Set just in case it is ever used
>>  - Fix docs
>>  - ... and 11 more: https://git.openjdk.org/jfx/compare/31fe622c...d72aefab
>
> modules/javafx.graphics/src/main/java/com/sun/javafx/css/FixedCapacitySet.java
>  line 419:
> 
>> 417:              */
>> 418: 
>> 419:             assert elements.length > requestedCapacity : "must have 
>> more buckets than capacity";
> 
> This just asserts that the previous three lines of code were correct. Seems a 
> bit excessive to me, if you really need this tested, I'd prefer a unit test.

True, but I think it's a lot easier to follow than the logic before it. I see 
it a bit more as a hint to future maintainers (which might be me) that there 
are assumptions being made here that code relies on.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1316#discussion_r1617025821

Reply via email to