JDK-4350827 : java.util.BitSet.nextClearBit(int) in jdk1.4 has wrong javadoc comments
  • Type: Bug
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.4.0
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.6
  • CPU: sparc
  • Submitted: 2000-07-06
  • Updated: 2025-09-26
  • Resolved: 2000-07-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.0 betaFixed
Related Reports
Relates :  
Description

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
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: generic merlin-beta FIXED IN: merlin-beta INTEGRATED IN: merlin-beta
14-06-2004

EVALUATION Submitter is correct.
11-06-2004