This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I have got this NPE when invoking "Fix Imports". Afterwards the feature is unusable - have to restart the IDE. java.lang.NullPointerException at java.lang.String.concat(String.java:1503) at org.netbeans.modules.javacore.parser.MemberClassScope.lookup(MemberClassScope.java:60) at org.netbeans.modules.javacore.parser.Scope.lookupMembers(Scope.java:85) at org.netbeans.modules.javacore.parser.Scope.lookup(Scope.java:48) at org.netbeans.modules.javacore.parser.MDRParser.getMemberOf(MDRParser.java:2076) at org.netbeans.modules.javacore.parser.MDRParser.processMultiPartId(MDRParser.java:2041) at org.netbeans.modules.javacore.parser.MDRParser.processMultiPartId(MDRParser.java:2038) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1910) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1892) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1927) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1573) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1927) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1573) at org.netbeans.modules.javacore.parser.MDRParser.processASTBody(MDRParser.java:1540) at org.netbeans.modules.javacore.parser.MDRParser.enterBody(MDRParser.java:180) at org.netbeans.modules.javacore.parser.MDRParser.doAttribution(MDRParser.java:154) at org.netbeans.modules.javacore.parser.MDRParser.isVariableAccess(MDRParser.java:982) at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.getElementProxy(MetadataElement.java:577) at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.createElement(MetadataElement.java:498) at org.netbeans.modules.javacore.jmiimpl.javamodel.MetadataElement.initOrCreate(MetadataElement.java:983) at org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.initChildren(LocalVarDeclarationImpl.java:91) at org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.getVariables(LocalVarDeclarationImpl.java:75) at org.netbeans.jmi.javamodel.LocalVarDeclaration$Impl.getVariables(Unknown Source) at org.netbeans.modules.javacore.jmiimpl.javamodel.LocalVarDeclarationImpl.getChildren(LocalVarDeclarationImpl.java:81) at org.netbeans.jmi.javamodel.LocalVarDeclaration$Impl.getChildren(Unknown Source) at org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:497) at org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:503) at org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:503) at org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:503) at org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:503) at org.netbeans.modules.editor.java.JavaFixAllImports.findPotentialClassNames(JavaFixAllImports.java:511) at org.netbeans.modules.editor.java.JavaFixAllImports.addAllNeededImports(JavaFixAllImports.java:116) at org.netbeans.modules.editor.java.JavaFixAllImports$1.run(JavaFixAllImports.java:67)
Created attachment 18665 [details] ide session log
Reassigning to java module
Tomas, please evaluate.
Please attach the source file, where you invoked "Fix Imports". Thanks.
Here is the file, it now looks different from the time when I have encountered the NPE however "Fix Imports" still fails with the same NPE whenever invoked witch is not the case with other source files in the same project. The file is OK and compilable, so ho knows what is going on?
Created attachment 18716 [details] Source file causing the NPE
Thanks for the file. I can reproduce it.
It seems to me like gjast problem. Somehow MULTI_PART_ID has second part (subtree with index 1) which is not IDENTIFIER. Please investigate.
Fixed support for trees for the source pattern "<multi-part-id>.super.<identifier>". Tests had already verified that "<multi-part-id>.super" and "super.<identifier>" worked.
P3->P2 - this needs to be fixed in release40 branch
I reviewed the diff and it seems to be OK. I also verified that this issue is no longer reproducible.
Fix merged to release40 on behalf of Tom. Checking in external/gjast.jar.scrambled; /cvs/java/external/gjast.jar.scrambled,v <-- gjast.jar.scrambled new revision: 1.89.4.1; previous revision: 1.89 done
Reorganization of java component