JDK-6452876 : JSR 199: DiagnosticCollector.report(null) should throw NPE
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-07-26
  • Updated: 2011-03-08
  • Resolved: 2011-03-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.
JDK 7
7 b03Fixed
Related Reports
Relates :  
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.
28-07-2006