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

(thread) What is the ThreadGroup of a dead thread?

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.2.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      generic
    • OS:
      generic

      Description

      allan.jacobs@Eng 1998-09-21

      In JDK 1.0.2 java.lang.Thread.getThreadGroup() was documented as follows:

      "If this thread is alive, this method returns a reference to the ThreadGroup
      object that represents the thread group to which this thread belongs. If this
      thread has died (has been stopped), this method returns null."

      In JDK 1.2, the return value from a thread that has either been stopped
      or has exited is null. The specification in the JDK 1.2 docs is less precise
      than it used to be:

      "Returns this thread's thread group."

      Is the terser wording intentional or an oversight?
      Should the original wording be restored?



      The JDK 1.2 documentation might still be considered to be complete on this question
      if java.lang.ThreadGroup itself defined to exclude dead threads. But, it is not. The
      definition of ThreadGroup reads:

      "A thread group represents a set of threads. In addition, a thread group can also
      include other thread groups. The thread groups form a tree in which every thread group
      except the initial thread group has a parent."

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                psoper Pete Soper (Inactive)
                Reporter:
                ajacobssunw Allan Jacobs (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: