Name: auR10023 Date: 07/06/2000
java.util.BitSet.nextClearBit(int) in jdk1.4 has wrong javadoc comments.
Here is the part of the java doc for this method:
...
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. ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
But According to the Java 2 Platform Std. Ed. v1.4 spec:
"BitSet class implements a vector of bits that grows as needed."
and
"By default, all bits in the set initially have the value false."
So, we could not obtain -1 value as result of this method and sentence:
"If no such bit exists then -1 is returned" should be removed from the java doc.
Selected
======================================================================