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

NullPointerException when using "Fast Import"

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Next
    • Fix Version/s: 9.0
    • Component/s: java - Source
    • Environment:
      Windows 10, Java 9.0.1

      Description

      When using "Fast Import" through the shortcut Ctrl-Shift-I on e.g. the class name of a variable declaration a NullPointerException is thrown:

      java.lang.NullPointerException
      	at org.netbeans.modules.java.editor.imports.ComputeImports.computeCandidates(ComputeImports.java:254)
      	at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:123)
      	at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:115)
      	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:523)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:609)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:137)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:204)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:201)
      	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:176)
      	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:360)
      	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:141)
      	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:90)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:201)
      	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:104)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:473)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:444)
      	at org.netbeans.modules.java.editor.imports.FastImportAction$2.run(FastImportAction.java:151)
      	at org.netbeans.modules.progress.ui.RunOffEDTImpl$1.run(RunOffEDTImpl.java:169)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
      Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
      	at org.openide.util.RequestProcessor.post(RequestProcessor.java:420)
      	at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThreadImpl(RunOffEDTImpl.java:163)
      	at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThread(RunOffEDTImpl.java:106)
      	at org.netbeans.api.progress.BaseProgressUtils.runOffEventDispatchThread(BaseProgressUtils.java:113)
      	at org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread(ProgressUtils.java:90)
      	at org.netbeans.modules.java.editor.imports.FastImportAction.actionPerformed(FastImportAction.java:147)
      	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:347)
      	at java.desktop/javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1805)
      	at java.desktop/javax.swing.JComponent.processKeyBinding(JComponent.java:2901)
      	at java.desktop/javax.swing.JComponent.processKeyBindings(JComponent.java:2949)
      	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2863)
      	at java.desktop/java.awt.Component.processEvent(Component.java:6355)
      	at java.desktop/java.awt.Container.processEvent(Container.java:2259)
      	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4961)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
      	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1955)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:827)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1096)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:966)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:792)
      	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4842)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2317)
      	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2758)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4793)
      	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
      	at java.desktop/java.awt.EventQueue.access$500(EventQueue.java:97)
      	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:717)
      	at java.desktop/java.awt.EventQueue$3.run(EventQueue.java:711)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:99)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:739)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:737)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:89)
      	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
      	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159)
      	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:199)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      [catch] at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

      IDE Details

      Product Version: NetBeans IDE Dev (Build 201712130002)
      Java: 9.0.1; Java HotSpot(TM) 64-Bit Server VM 9.0.1+11
      Runtime: Java(TM) SE Runtime Environment 9.0.1+11
      System: Windows 10 version 10.0 running on amd64; Cp1252; en_DE (nb)
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                shammat Thomas Kellerer
              • Votes:
                0 Vote for this issue
                Watchers:
                3 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 - 0.5h
                  0.5h