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

NPE on importing non-resolvable class

    XMLWordPrintableJSON

Details

    Description

      When the IDE tries to add an import statement for a class which is not resolvable from the current classpath it throws an NPE.

      java.lang.NullPointerException
      	at org.netbeans.modules.java.source.pretty.ImportAnalysis2.resolveImport(ImportAnalysis2.java:351)
      	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:2231)

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lkishalmi Laszlo Kishalmi
              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