-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
1.2.0
-
sparc
-
solaris_2.4
Name: akC45999 Date: 09/29/97
The specification of Thread.enumerate(Thread[]) method says that
"This method simply calls the enumerate method of this
thread's thread group with the array argument. "
However, jdk12M does not call to neither java.lang.ThreadGroup.enumerate(Thread[]),
nor java.lang.ThreadGroup.enumerate(Thread[], boolean).
// test is derived from javasoft.sqe.tests.api.java.lang.Thread.enumerate0102
import java.io.PrintStream;
class enumerate0102g extends ThreadGroup {
int invCount=0;
public int enumerate(Thread[] tarray) {
invCount++;
return super.enumerate(tarray);
}
public int enumerate(Thread[] tarray, boolean recurse) {
invCount++;
return super.enumerate(tarray,recurse);
}
enumerate0102g() {
super("enumerate0102g ");
}
} // end class enumerate0102g
public class enumerate0102 {
public static void main(String args[]) {
enumerate0102g group=new enumerate0102g();
Thread thrd =new Thread(group, "enumerate0102t");
thrd.enumerate(new Thread[10]);
System.out.println("invCount="+group.invCount);
}
}
Running the test:
novo37% javac enumerate0102.java
novo37% setenv CLASSPATH .
novo37% java enumerate0102
invCount=0
======================================================================