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

NullPointerException when compiling program

XMLWordPrintable

    • sparc
    • generic

      compile the following program:

      public class Test {
          void xx() {
          } {}
      }

      got this:

      java.lang.NullPointerException
              at sun.tools.tree.InlineMethodExpression.inlineValue(InlineMethodExpression.java:49)
              at sun.tools.tree.BinaryAssignExpression.inlineValue(BinaryAssignExpression.java:63)
              at sun.tools.tree.BinaryAssignExpression.inline(BinaryAssignExpression.java:59)
              at sun.tools.tree.CommaExpression.inline(CommaExpression.java:72)
              at sun.tools.tree.MethodExpression.inline(MethodExpression.java:387)
              at sun.tools.tree.ExpressionStatement.inline(ExpressionStatement.java:51)
              at sun.tools.tree.CompoundStatement.inline(CompoundStatement.java:65)
              at sun.tools.javac.SourceField.inline(SourceField.java:386)
              at sun.tools.javac.SourceField.code(SourceField.java:450)
              at sun.tools.javac.SourceClass.compileClass(SourceClass.java:850)
              at sun.tools.javac.SourceClass.compile(SourceClass.java:806)
              at sun.tools.javac.Main.compile(Main.java:267)
              at sun.tools.javac.Main.main(Main.java:375)
      error: An exception has occurred in the compiler; please file a bug report (###@###.###).
      1 error

            tturnidgsunw Todd Turnidge (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: