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

NPE at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:100)

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: java - Source
    • Environment:

      Description

      1. Open attached file.
      2. Position caret on the first word of line 79 ("BigDecimal")
      3. Hit ALT+SHIFT+I
      4. Exception thrown:

      java.lang.NullPointerException
      	at javax.lang.model.util.ElementFilter.listFilter(ElementFilter.java:216)
      	at javax.lang.model.util.ElementFilter.typesIn(ElementFilter.java:154)
      	at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:100)
      	at org.netbeans.modules.java.editor.imports.FastImportAction$1.run(FastImportAction.java:90)
      	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:501)
      	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:451)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:422)
      	at org.netbeans.modules.java.editor.imports.FastImportAction$2.run(FastImportAction.java:126)
      	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)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      Caused: org.openide.util.RequestProcessor$SlowItem: task failed due to
      	at org.openide.util.RequestProcessor.post(RequestProcessor.java:395)
      	at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThreadImpl(RunOffEDTImpl.java:140)
      	at org.netbeans.modules.progress.ui.RunOffEDTImpl.runOffEventDispatchThread(RunOffEDTImpl.java:83)
      	at org.netbeans.api.progress.BaseProgressUtils.runOffEventDispatchThread(BaseProgressUtils.java:90)
      	at org.netbeans.api.progress.ProgressUtils.runOffEventDispatchThread(ProgressUtils.java:67)
      	at org.netbeans.modules.java.editor.imports.FastImportAction.actionPerformed(FastImportAction.java:122)
      	at org.netbeans.editor.BaseAction.actionPerformed(BaseAction.java:322)
      	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:136)
      	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)
      

        Attachments

        1. TradeStream.java
          7 kB
          Gili

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                cowwoc Gili
              • 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 - 20m
                  20m