On Mon, 14 Sep 2020 09:50:05 GMT, Ajit Ghaisas <aghai...@openjdk.org> wrote:
>> yosbits 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. > > modules/javafx.controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java > line 899: > >> 897: for (;;) { >> 898: index = bitset.nextSetBit(index + 1); >> 899: if (index < 0) { > > As we are checking for nextSetBit, shouldn't we be checking for overflow > rather than underflow? > Refer - > [javadoc](https://docs.oracle.com/en/java/javase/14/docs/api/java.base/java/util/BitSet.html#nextSetBit(int)) Since it cannot be loaded with a smaller number of items than Integer.MAX_VALUE (it looks like it freezes), overflow does not occur in the actual usage environment. ------------- PR: https://git.openjdk.java.net/jfx/pull/127