Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2158237 | 6u10 | Karunakar Gajjala | P3 | Closed | Fixed | b12 |
JDK-2171608 | 5.0u18 | Karunakar Gajjala | P3 | Closed | Fixed | b01 |
JDK-2156937 | 5.0u17-rev | Karunakar Gajjala | P3 | Closed | Fixed | b09 |
With the following test program, NullPointerException will be
thrown. That is not in line with the API.
http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#getStackTrace()
TP:
----->
public class STNull {
public static void main(String[] args) throws Exception {
while(true) {
Thread t = new Thread();
t.start();
StackTraceElement[] stes = t.getStackTrace();
System.out.println(stes.length);
}
}
}
<-----
One of our customers reported NPE would be seen on Linux/EM64T below.
----->
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_12-b04, mixed mode)
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b04)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b04, mixed mode)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b13)
Java HotSpot(TM) 64-Bit Server VM (build 1.7.0-ea-b13, mixed mode)
<-----
I also reproduced this against both jdk 5.0 and jdk 6.0 on my Windows
XP laptop as follows.
----->
$ java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
$ java STNull
0
0
0
0
0
Exception in thread "main" java.lang.NullPointerException
at STNull.main(STNull.java:7)
$ /g/jdk60/bin/java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
$ /g/jdk60/bin/java STNull
0
0
0
0
0
0
0
0
Exception in thread "main" java.lang.NullPointerException
at STNull.main(STNull.java:7)
<-----
thrown. That is not in line with the API.
http://java.sun.com/javase/6/docs/api/java/lang/Thread.html#getStackTrace()
TP:
----->
public class STNull {
public static void main(String[] args) throws Exception {
while(true) {
Thread t = new Thread();
t.start();
StackTraceElement[] stes = t.getStackTrace();
System.out.println(stes.length);
}
}
}
<-----
One of our customers reported NPE would be seen on Linux/EM64T below.
----->
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_12-b04, mixed mode)
java version "1.6.0_02"
Java(TM) SE Runtime Environment (build 1.6.0_02-b04)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b04, mixed mode)
java version "1.7.0-ea"
Java(TM) SE Runtime Environment (build 1.7.0-ea-b13)
Java HotSpot(TM) 64-Bit Server VM (build 1.7.0-ea-b13, mixed mode)
<-----
I also reproduced this against both jdk 5.0 and jdk 6.0 on my Windows
XP laptop as follows.
----->
$ java -version
java version "1.5.0_10"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_10-b03)
Java HotSpot(TM) Client VM (build 1.5.0_10-b03, mixed mode, sharing)
$ java STNull
0
0
0
0
0
Exception in thread "main" java.lang.NullPointerException
at STNull.main(STNull.java:7)
$ /g/jdk60/bin/java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode)
$ /g/jdk60/bin/java STNull
0
0
0
0
0
0
0
0
Exception in thread "main" java.lang.NullPointerException
at STNull.main(STNull.java:7)
<-----
- backported by
-
JDK-2156937 (thread) Thread.getStackTrace() returns null
- Closed
-
JDK-2158237 (thread) Thread.getStackTrace() returns null
- Closed
-
JDK-2171608 (thread) Thread.getStackTrace() returns null
- Closed
- relates to
-
JDK-6782220 test/java/lang/Thread/NullStackTrace.java test failed against 5u17-rev-b05
- Resolved