You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2023/01/02 10:15:12 UTC

[GitHub] [netbeans] jjazzboss opened a new issue, #5177: NPE in Java hints RemoveUnnecessary.java line 151

jjazzboss opened a new issue, #5177:
URL: https://github.com/apache/netbeans/issues/5177

   ### Apache NetBeans version
   
   Apache NetBeans 16
   
   ### What happened
   
   Just started Netbeans 16 with my project, like everyday, I did not do anything. I saw the exception popup.  Below is the stack trace.
   
   ```
   java.lang.NullPointerException: Cannot invoke "java.util.Collection.toArray()" because "c" is null
   	at java.base/java.util.ArrayList.addAll(ArrayList.java:670)
   	at org.netbeans.modules.java.hints.control.RemoveUnnecessary.unnecessaryReturnContinue(RemoveUnnecessary.java:151)
   	at org.netbeans.modules.java.hints.control.RemoveUnnecessary.unnecessaryReturn(RemoveUnnecessary.java:99)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
   [catch] at org.netbeans.modules.java.hints.providers.code.CodeHintProviderImpl$WorkerImpl.createErrors(CodeHintProviderImpl.java:315)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:794)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.doComputeHints(HintsInvoker.java:562)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHintsImpl(HintsInvoker.java:282)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:227)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:192)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:165)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.computeHints(HintsInvoker.java:127)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:113)
   	at org.netbeans.modules.java.hints.spiimpl.hints.HintsTask.run(HintsTask.java:63)
   	at org.netbeans.modules.java.source.JavaSourceAccessor$CancelableTaskWrapper.run(JavaSourceAccessor.java:273)
   	at org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561)
   	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)
   
   ```
   
   ### How to reproduce
   
   I tried to close and reopen Netbeans to reproduce, but error was gone.
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   WIN10
   
   ### JDK
   
   JDK 17 x64 Adoptium
   
   ### Apache NetBeans packaging
   
   Apache NetBeans binary zip
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No
   
   ### Code of Conduct
   
   Yes


-- 
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: notifications-unsubscribe@netbeans.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien commented on issue #5177: NPE in Java hints RemoveUnnecessary.java line 151

Posted by GitBox <gi...@apache.org>.
mbien commented on issue #5177:
URL: https://github.com/apache/netbeans/issues/5177#issuecomment-1369184292

   you think you could provide a minimal reproducer? This is about a switch-case snipped, maybe you can find it in your code.
   
   Fix is pending in the linked PR. The workflow will produce a dev build if you want to test it.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] mbien closed issue #5177: NPE in Java hints RemoveUnnecessary.java line 151

Posted by GitBox <gi...@apache.org>.
mbien closed issue #5177: NPE in Java hints RemoveUnnecessary.java line 151
URL: https://github.com/apache/netbeans/issues/5177


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists


[GitHub] [netbeans] jjazzboss commented on issue #5177: NPE in Java hints RemoveUnnecessary.java line 151

Posted by GitBox <gi...@apache.org>.
jjazzboss commented on issue #5177:
URL: https://github.com/apache/netbeans/issues/5177#issuecomment-1369695084

   Sorry I tried to reproduce but was not able too. I had a dozen of java files opened  when it happened, with many switch-case, no idea which one caused the problem.


-- 
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: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists