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

NPE with Insert Code action in Java files

    XMLWordPrintableJSON

Details

    Description

      Using the Insert Code action doesn't work in Java files in certain projects - possibly when source level above 8. There is a NullPointerException and stack trace as below

      SEVERE [org.openide.util.RequestProcessor]: Error in RequestProcessor org.netbeans.modules.progress.ui.RunOffEDTImpl$1
      java.lang.NullPointerException
      {{ at org.netbeans.modules.java.hints.jdk.AnnotationProcessors$ProcessorHintSupport.initialize(AnnotationProcessors.java:238)}}
      {{ at org.netbeans.modules.java.hints.ui.AnnoProcessorGenerator.create(AnnoProcessorGenerator.java:70)}}
      {{ at org.netbeans.modules.editor.codegen.NbGenerateCodeAction$Task.run(NbGenerateCodeAction.java:156)}}
      {{ at org.netbeans.modules.java.editor.codegen.ContextProvider$1.run(ContextProvider.java:49)}}
      {{ at org.netbeans.modules.java.editor.codegen.ContextProvider$1.run(ContextProvider.java:44)}}
      {{ at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)}}
      {{ at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)}}
      {{ at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)}}
      {{ at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)}}
      {{ at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)}}
      {{ at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)}}
      {{ at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)}}
      {{ at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)}}
      {{ at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)}}
      {{ at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)}}
      {{ at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)}}
      {{ at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:81)}}
      {{ at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)}}
      {{ at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)}}
      {{ at org.netbeans.modules.java.editor.codegen.ContextProvider.runTaskWithinContext(ContextProvider.java:44)}}
      {{ at org.netbeans.modules.editor.codegen.NbGenerateCodeAction$Task.run(NbGenerateCodeAction.java:153)}}
      {{ at org.netbeans.modules.editor.codegen.NbGenerateCodeAction$1.run(NbGenerateCodeAction.java:74)}}
      {{ at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:146)}}
      {{ 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)}}
      [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              neilcsmith Neil C Smith
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m