-
Bug
-
Resolution: Fixed
-
P4
-
6
-
b03
-
generic
-
generic
-
Verified
DiganosticCollector.report(null) should throw NPE
<testcase>
import javax.tools.*;
public class Foo {
public static void main(String... arg) throws Throwable {
DiagnosticCollector<JavaFileObject> dl
= new DiagnosticCollector<JavaFileObject>();
dl.report(null);
throw new Exception("Expected null pointer exception not thrown");
}
}
</testcase>
<output>
bash-3.00$ java Foo
Exception in thread "main" java.lang.Exception: Expected null pointer exception not thrown
at Foo.main(Foo.java:7)
</output>
<java-version>
bash-3.00$ java -version
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b92)
</java-version>
<testcase>
import javax.tools.*;
public class Foo {
public static void main(String... arg) throws Throwable {
DiagnosticCollector<JavaFileObject> dl
= new DiagnosticCollector<JavaFileObject>();
dl.report(null);
throw new Exception("Expected null pointer exception not thrown");
}
}
</testcase>
<output>
bash-3.00$ java Foo
Exception in thread "main" java.lang.Exception: Expected null pointer exception not thrown
at Foo.main(Foo.java:7)
</output>
<java-version>
bash-3.00$ java -version
java version "1.6.0-rc"
Java(TM) SE Runtime Environment (build 1.6.0-rc-b92)
</java-version>
- relates to
-
JDK-6437349 JSR 199: JavaFileObject.isNameCompatible() will give true with some incompatible kinds
- Closed