Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
11.2
Description
Consider code like this:
—
public class Test2 {
public static void main(String[] args) {
Comparator<String> c = new Comparator<String>() {
};
}
}
There is a method missing in the anonymous class, but an attempt to add it using the error fix leads to:
—
java.lang.NullPointerException
at org.netbeans.api.java.source.ElementUtilities.findUnimplementedMethods(ElementUtilities.java:904)
at org.netbeans.api.java.source.ElementUtilities.findUnimplementedMethods(ElementUtilities.java:665)
at org.netbeans.modules.java.editor.codegen.ImplementOverrideMethodGenerator.getImplementDescriptions(ImplementOverrideMethodGenerator.java:218)
at org.netbeans.modules.java.editor.codegen.ImplementOverrideMethodGenerator.selectMethodsToImplement(ImplementOverrideMethodGenerator.java:145)
at org.netbeans.modules.java.hints.errors.ImplementAllAbstractMethods$ImplementFixBase$1.run(ImplementAllAbstractMethods.java:320)
at org.netbeans.modules.java.hints.errors.ImplementAllAbstractMethods$ImplementFixBase$1.run(ImplementAllAbstractMethods.java:316)
at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
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:452)
at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
at org.netbeans.modules.java.hints.errors.ImplementAllAbstractMethods$ImplementFixBase.implement(ImplementAllAbstractMethods.java:316)
[catch] at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:810)
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)
—
Originally reported here:
Attachments
Issue Links
- links to