Name: auR10023 Date: 06/30/2000
java.util.BitSet.nextClearBit(int) in jdk1.4 has wrong javadoc comments.
...
Returns the index of the first bit that is set to false that occurs on or after the
specified starting index. If no such bit exists then -1 is returned. To iterate over
the false bits in a BitSet, use the following loop: for(int i=bs.nextClearBit(0);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
i>=0; i=bs.nextClearBit(i+1)) { // operate on index i here }
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
The sample code in this text contains infinitive loop for any BitSet.
======================================================================