Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6452876

JSR 199: DiagnosticCollector.report(null) should throw NPE

    Details

    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Verified

      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>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ahe Peter Ahe
                Reporter:
                savadhansunw Seetharama Avadhanam (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: