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

NPE on navigate-to-class

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 11.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      Press ^1, ^O, type *Foo*Task, get this, and no class:

      java.lang.NullPointerException
      at org.netbeans.modules.java.source.pretty.ImportAnalysis2.getPackageOf(ImportAnalysis2.java:393)
      at org.netbeans.modules.java.source.pretty.ImportAnalysis2.resolveImport(ImportAnalysis2.java:310)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:475)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitMemberSelect(ImmutableTreeTranslator.java:74)
      at com.sun.tools.javac.tree.JCTree$JCFieldAccess.accept(JCTree.java:2203)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:123)
      at org.netbeans.api.java.source.WorkingCopy$5.translate(WorkingCopy.java:871)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translateClassRef(ImmutableTreeTranslator.java:135)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:593)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitClass(ImmutableTreeTranslator.java:335)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitClass(ImmutableTreeTranslator.java:74)
      at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:818)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:123)
      at org.netbeans.api.java.source.WorkingCopy$5.translate(WorkingCopy.java:871)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:198)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.rewriteChildren(ImmutableTreeTranslator.java:545)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitCompilationUnit(ImmutableTreeTranslator.java:322)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.visitCompilationUnit(ImmutableTreeTranslator.java:74)
      at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:599)
      at org.netbeans.modules.java.source.transform.ImmutableTreeTranslator.translate(ImmutableTreeTranslator.java:123)
      at org.netbeans.api.java.source.WorkingCopy$5.translate(WorkingCopy.java:871)
      at org.netbeans.api.java.source.WorkingCopy$5.translate(WorkingCopy.java:867)
      at org.netbeans.api.java.source.WorkingCopy.processCurrentCompilationUnit(WorkingCopy.java:899)
      at org.netbeans.api.java.source.WorkingCopy.getChanges(WorkingCopy.java:1326)
      at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:676)
      at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
      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.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
      at org.netbeans.modules.java.classfile.CodeGenerator.generateCode(CodeGenerator.java:152)
      at org.netbeans.modules.java.classfile.BinaryElementOpenImpl.open(BinaryElementOpenImpl.java:44)
      at org.netbeans.api.java.source.ui.ElementOpen.binaryOpen(ElementOpen.java:118)
      at org.netbeans.api.java.source.ui.ElementOpen.open(ElementOpen.java:99)
      at org.netbeans.modules.java.source.ui.JavaTypeDescription.open(JavaTypeDescription.java:121)
      at org.netbeans.modules.jumpto.type.GoToTypeAction.actionPerformed(GoToTypeAction.java:153)
      at org.openide.windows.TopComponent.processKeyBinding(TopComponent.java:1151)
      at javax.swing.JComponent.processKeyBindings(JComponent.java:2943)
      at javax.swing.JComponent.processKeyEvent(JComponent.java:2845)
      at org.openide.explorer.view.TreeView$ExplorerTree.processKeyEvent(TreeView.java:1870)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                arren Shevek
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: