United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6452876 JSR 199: DiagnosticCollector.report(null) should throw NPE
JDK-6452876 : JSR 199: DiagnosticCollector.report(null) should throw NPE

Details
Type:
Bug
Submit Date:
2006-07-26
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
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>

                                    

Comments
EVALUATION

Yes.
                                     
2006-07-28



Hardware and Software, Engineered to Work Together