Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6321234

(spec thread) Thread.sleep() references Object.notify()

XMLWordPrintable

    • b16
    • x86
    • windows_xp
    • Not verified

        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.

              chegar Chris Hegarty
              jssunw Jitender S (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: