JDK-4253584 : Description of Thread.enumerate(Thread[]) is misleading.
  • Type: Bug
  • Component: specification
  • Sub-Component: language
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_2.5
  • CPU: sparc
  • Submitted: 1999-07-13
  • Updated: 2001-08-08
  • Resolved: 2001-08-08
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 beta2Fixed
Related Reports
Relates :  
Description

Name: akC45999			Date: 07/13/99



The description of java.lang.Thread.enumerate(Thread[]) reads:

   public static int enumerate(Thread[] tarray)

   Copies into the specified array every active thread in this thread's
   thread group and its subgroups.

The word 'this' in method descriptions usually means the object
to which the method is applied. Thus, in the text:

  Thread thrd=new Thread();
  thrd.enumerate(...)

this would mean 'thrd'.

But the method is static so the object reference is ignored,
and the code 

  thrd.enumerate(...)

is equivalent to the

  Thread.enumerate(...)

and the method  enumerate() in the code
is applied to the current thread and not to the thread 'thrd'.

So the words 

  ...  every active thread in this thread's thread group

should be replaced with

   ... every active thread in the current thread's thread group

======================================================================

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

EVALUATION I think this report is correct. Passing on to Josh for final comment. gilad.bracha@eng 1999-07-23
23-07-1999