Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-267

NullPointerException at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.visitMethodDef(JavacProcessingEnvironment.java:1648)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: java - Source
    • Labels:
      None

      Description

      A NullPointerException occurs when opening the following erroneous Java source file:

      package bugs;
      
      public class Test {
          public enum E {
              A()
              {
              };
      
              private E()
          }
      }
      

      Full stack trace:

      java.lang.NullPointerException
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.visitMethodDef(JavacProcessingEnvironment.java:1648)
      	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:872)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.scan(JavacProcessingEnvironment.java:1561)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
      	at com.sun.tools.javac.tree.TreeScanner.visitClassDef(TreeScanner.java:118)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.visitClassDef(JavacProcessingEnvironment.java:1597)
      	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:778)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.scan(JavacProcessingEnvironment.java:1561)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
      	at com.sun.tools.javac.tree.TreeScanner.visitClassDef(TreeScanner.java:118)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.visitClassDef(JavacProcessingEnvironment.java:1597)
      	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:778)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.scan(JavacProcessingEnvironment.java:1561)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:57)
      	at com.sun.tools.javac.tree.TreeScanner.visitTopLevel(TreeScanner.java:66)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.visitTopLevel(JavacProcessingEnvironment.java:1591)
      	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:531)
      	at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$1.scan(JavacProcessingEnvironment.java:1561)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.newRound(JavacProcessingEnvironment.java:1285)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.<init>(JavacProcessingEnvironment.java:1088)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.next(JavacProcessingEnvironment.java:1128)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1330)
      	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1336)
      	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1224)
      	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:397)
      	at com.sun.tools.javac.api.JavacTaskImpl.enter(JavacTaskImpl.java:320)
      	at org.netbeans.modules.java.source.parsing.JavacParser.moveToPhase(JavacParser.java:619)
      	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:480)
      	at org.netbeans.modules.java.source.parsing.JavacParser.getResult(JavacParser.java:134)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callGetResult(TaskProcessor.java:608)
      	at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:239)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:775)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      

        Attachments

        1. Test.dump
          7 kB
          Daniel Trebbien

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dtrebbien Daniel Trebbien
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: