Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
10.0
-
None
-
None
-
Product Version: Apache NetBeans IDE Dev (Build incubator-netbeans-release-360-on-20181029)
Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28
Runtime: Java(TM) SE Runtime Environment 11+28
System: Windows 7 version 6.1 running on amd64; Cp1250; cs_CZ (nb)
User directory: C:\Java\NetBeans\dev
Cache directory: C:\Java\NetBeans\cache\devProduct Version: Apache NetBeans IDE Dev (Build incubator-netbeans-release-360-on-20181029) Java: 11; Java HotSpot(TM) 64-Bit Server VM 11+28 Runtime: Java(TM) SE Runtime Environment 11+28 System: Windows 7 version 6.1 running on amd64; Cp1250; cs_CZ (nb) User directory: C:\Java\NetBeans\dev Cache directory: C:\Java\NetBeans\cache\dev
Description
I had this Java code:
javax.persistence.Query query = entityManager....;
List<?> lastKeyIds = query.getResultList();
if (!lastKeyIds.isEmpty()) ...
and tried to replace element type from "?" (in "List<?>") by pasting "BigDecimal" from clipboard. When I tried to repeat the same action, it didn't fail.
NetBeans stacktrace:
java.lang.NullPointerException
at org.netbeans.lib.nbjavac.services.NBJavadocMemberEnter.visitVarDef(NBJavadocMemberEnter.java:97)
at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:962)
at com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:172)
at com.sun.tools.javac.comp.Attr.visitVarDef(Attr.java:1184)
at com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:962)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:673)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:749)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:773)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1350)
at org.netbeans.lib.nbjavac.services.NBAttr.visitBlock(NBAttr.java:73)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1026)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:673)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:749)
at com.sun.tools.javac.comp.Attr.attribStatToTree(Attr.java:431)
at com.sun.tools.javac.api.JavacTrees.attribStatToTree(JavacTrees.java:1017)
at com.sun.tools.javac.api.JavacTrees.getAttrContext(JavacTrees.java:976)
at com.sun.tools.javac.api.JavacTrees.getScope(JavacTrees.java:835)
at com.sun.tools.javac.api.JavacTrees.getScope(JavacTrees.java:172)
at org.netbeans.modules.java.editor.imports.ClipboardHandler$6.run(ClipboardHandler.java:249)
at org.netbeans.modules.java.editor.imports.ClipboardHandler$6.run(ClipboardHandler.java:243)
at org.netbeans.modules.java.editor.imports.ClipboardHandler$7$1.run(ClipboardHandler.java:321)
at org.netbeans.modules.java.editor.imports.ClipboardHandler$7$1.run(ClipboardHandler.java:316)
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.ClipboardHandler$7.run(ClipboardHandler.java:316)
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$FastItem: task failed due to