On Mon, 14 Sep 2020 10:03:59 GMT, Ajit Ghaisas <aghai...@openjdk.org> wrote:
> Can you please provide an automated test along with your fix? Automated performance testing should be distinguished from regular testing tasks, as it extends the build time. Is there a task name for that in gradle? Also, didn't you exclude performance testing from automated testing (or Unit Test)? Or, if you want to maintain this test in a repository, you need to tell me the directory where it is stored. The reviewer didn't point out that the There's a little bit of wastage left in the toArray(), so I'm going to push a modified version. > modules/javafx.controls/src/main/java/javafx/scene/control/MultipleSelectionModelBase.java > line 861: > >> 859: } >> 860: >> 861: /** Returns number of true bits in BitSet */ > > Method description and work done by it is no more matching. Can you please > update the comment? This comment is correct. this.size is the cache. > 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