lkishalmi opened a new pull request, #4006:
URL: https://github.com/apache/netbeans/pull/4006
Just seen an NPE in UnusedDetector while coding in a recent build. Have not
checked the root cause though the getResources() call in line 321 is allowed to
return ```null``` in some not, necessarily, ideal cases.
The Exception, I've encountered with:
```
java.lang.NullPointerException: Cannot invoke "java.util.Set.iterator()"
because "res" is null
at
org.netbeans.modules.java.editor.base.semantic.UnusedDetector.isUnusedInPkg(UnusedDetector.java:322)
at
org.netbeans.modules.java.editor.base.semantic.UnusedDetector.findUnused(UnusedDetector.java:131)
at
org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase.process(SemanticHighlighterBase.java:185)
at
org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:56)
at
org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase.run(SemanticHighlighterBase.java:112)
at
org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
[catch] at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.run(TaskProcessor.java:786)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:279)
at
org.netbeans.modules.parsing.impl.TaskProcessor$RequestPerformer.execute(TaskProcessor.java:702)
at
org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:663)
at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
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)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists