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

NullPointerException in Java plugin

    XMLWordPrintableJSON

Details

    Description

      I've just got exception when I was trying to find usages of a class constructor.

      Product Version: Apache NetBeans IDE 11.1
      Updates: NetBeans IDE is updated to version NetBeans 8.2 Patch 2
      Java: 11.0.4; OpenJDK 64-Bit Server VM 11.0.4+11-post-Ubuntu-1ubuntu218.04.3
      Runtime: OpenJDK Runtime Environment 11.0.4+11-post-Ubuntu-1ubuntu218.04.3
      System: Linux version 5.0.0-37-generic running on amd64; UTF-8; en_US (nb)

      java.lang.NullPointerException
      at org.netbeans.modules.refactoring.java.plugins.FindUsagesVisitor.visitNewClass(FindUsagesVisitor.java:398)
      at org.netbeans.modules.refactoring.java.plugins.FindUsagesVisitor.visitNewClass(FindUsagesVisitor.java:54)
      at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1792)
      at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      at com.sun.source.util.TreeScanner.visitReturn(TreeScanner.java:496)
      at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1635)
      at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106)
      at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:249)
      at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1044)
      at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:91)
      at com.sun.source.util.TreeScanner.visitMethod(TreeScanner.java:207)
      at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:910)
      at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:91)
      at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106)
      at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:114)
      at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:188)
      at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:818)
      at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106)
      at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:114)
      at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:145)
      at org.netbeans.modules.refactoring.java.plugins.FindUsagesVisitor.visitCompilationUnit(FindUsagesVisitor.java:139)
      at org.netbeans.modules.refactoring.java.plugins.FindUsagesVisitor.visitCompilationUnit(FindUsagesVisitor.java:54)
      at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:599)
      at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      at org.netbeans.modules.refactoring.java.plugins.JavaWhereUsedQueryPlugin$FindTask.run(JavaWhereUsedQueryPlugin.java:611)
      at org.netbeans.modules.refactoring.java.plugins.JavaWhereUsedQueryPlugin$FindTask.run(JavaWhereUsedQueryPlugin.java:548)
      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$MultiUserTaskAction.run(ParserManager.java:166)
      at org.netbeans.modules.parsing.api.ParserManager$MultiUserTaskAction.run(ParserManager.java:138)
      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:83)
      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.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:319)
      at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:263)
      at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.queryFiles(JavaRefactoringPlugin.java:253)
      at org.netbeans.modules.refactoring.java.plugins.JavaWhereUsedQueryPlugin.prepare(JavaWhereUsedQueryPlugin.java:362)
      [catch] at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:417)
      at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:401)
      at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:212)
      at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare$2.run(ParametersPanel.java:1059)
      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

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lsdfkj Mikhail
              Votes:
              1 Vote for this issue
              Watchers:
              4 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 - 40m
                  40m