[ https://issues.apache.org/jira/browse/NETBEANS-3498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Barboni resolved NETBEANS-3498. ------------------------------------ Resolution: Fixed merge PR > Cannot add unimplemented methods to anonymous innerclasses > ---------------------------------------------------------- > > Key: NETBEANS-3498 > URL: https://issues.apache.org/jira/browse/NETBEANS-3498 > Project: NetBeans > Issue Type: Bug > Components: java - Source > Affects Versions: 11.2 > Reporter: Jan Lahoda > Assignee: Jan Lahoda > Priority: Major > Labels: pull-request-available > Fix For: 11.3 > > Time Spent: 20m > Remaining Estimate: 0h > > 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: > [http://mail-archives.apache.org/mod_mbox/netbeans-users/201911.mbox/%3C2971b37b-5471-2ec8-f52d-28ac2b3e6165%40univ-cotedazur.fr%3E] > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org For additional commands, e-mail: commits-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists