Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2153341 | OpenJDK6 | Chris Hegarty | P3 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
all operating systems
A DESCRIPTION OF THE PROBLEM :
When you read the JavaDoc for
java.lang.Thread.sleep(long) or
java.lang.Thread.sleep(long,int),
then you'll find an entry
"See Also: Object.notify()".
This makes the reader think that Object.notify()
could possibly awake a sleeping Thread,
like it awakes a waiting Thread -- waiting by Object.wait().
As far as I know, this is false.
So the "See also:" field should be empty or
it could mention java.lang.Object.wait(long)
respectively java.lang.Object.wait(long,int).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Read the JavaDoc for java.lang.Thread.sleep().
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
You'll find a documentation with a bug.
ACTUAL -
I found a documentation with a bug.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.5.0_04"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
Java HotSpot(TM) Client VM (build 1.5.0_04-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
all operating systems
A DESCRIPTION OF THE PROBLEM :
When you read the JavaDoc for
java.lang.Thread.sleep(long) or
java.lang.Thread.sleep(long,int),
then you'll find an entry
"See Also: Object.notify()".
This makes the reader think that Object.notify()
could possibly awake a sleeping Thread,
like it awakes a waiting Thread -- waiting by Object.wait().
As far as I know, this is false.
So the "See also:" field should be empty or
it could mention java.lang.Object.wait(long)
respectively java.lang.Object.wait(long,int).
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Read the JavaDoc for java.lang.Thread.sleep().
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
You'll find a documentation with a bug.
ACTUAL -
I found a documentation with a bug.
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-2153341 (spec thread) Thread.sleep() references Object.notify()
- Resolved
- relates to
-
JDK-6317167 (thread spec) Make Thread.sleep javadoc fully in line with JLS 17.9
- Open