Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
9.0
Description
Var type can only be used for local variables but this exception should not be thrown. We should display appropriate hint for invalid var usage.
java.lang.IllegalArgumentException: Unsupported type: none, kind: NONE
at org.netbeans.modules.java.source.usages.ClassFileUtil.encodeType(ClassFileUtil.java:294)
at org.netbeans.modules.java.source.usages.ClassFileUtil.createFieldDescriptor(ClassFileUtil.java:148)
at org.netbeans.api.java.source.ElementHandle.createImpl(ElementHandle.java:476)
at org.netbeans.api.java.source.ElementHandle.create(ElementHandle.java:397)
at org.netbeans.modules.java.navigation.CaretListeningTask.updateNavigatorSelection(CaretListeningTask.java:296)
at org.netbeans.modules.java.navigation.CaretListeningTask.run(CaretListeningTask.java:153)
at org.netbeans.modules.java.navigation.CaretListeningTask.run(CaretListeningTask.java:55)
[catch] 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:514)
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)
Attachments
Attachments
Issue Links
- is related to
-
NETBEANS-1117 java.lang.IllegalArgumentException when using var in the class level
- Closed
- links to