[ https://issues.apache.org/jira/browse/NETBEANS-4177?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benjamin Graf reassigned NETBEANS-4177: --------------------------------------- Assignee: Benjamin Graf > IOOBE when editing Java file with temporarily missing comma in method > parameter list > ------------------------------------------------------------------------------------ > > Key: NETBEANS-4177 > URL: https://issues.apache.org/jira/browse/NETBEANS-4177 > Project: NetBeans > Issue Type: Bug > Components: java - Editor > Affects Versions: 11.3 > Environment: NetBeans 11.3 with nbjavac plugin installed > Reporter: Eirik Bakke > Assignee: Benjamin Graf > Priority: Major > Labels: nbjavac, pull-request-available > Time Spent: 1h 10m > Remaining Estimate: 0h > > If, during editing, a comma is momentarily deleted in the parameter list of a > method (in certain cases), an error dialog shows up showing an > IndexOutOfBoundsException in > SemanticHighlighterBase$DetectorVisitor.addParameterInlineHint. A minimized > example exhibiting this behavior is as follows: > {code:java} > public class BugSemanticHighlighterBase { > private Object testMethod(final String arg1 final String arg2) { > return new String(""); > } > } > {code} > This example causes the IDE to throw the following exception: > {noformat} > java.lang.IndexOutOfBoundsException: -1 > at com.sun.tools.javac.util.List.get(List.java:482) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.addParameterInlineHint(SemanticHighlighterBase.java:1241) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitLiteral(SemanticHighlighterBase.java:1180) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitLiteral(SemanticHighlighterBase.java:424) > at com.sun.tools.javac.tree.JCTree$JCLiteral.accept(JCTree.java:2410) > at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1199) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:424) > at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitNewClass(SemanticHighlighterBase.java:1085) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitNewClass(SemanticHighlighterBase.java:424) > at com.sun.tools.javac.tree.JCTree$JCNewClass.accept(JCTree.java:1820) > at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1199) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:424) > at com.sun.source.util.TreeScanner.visitReturn(TreeScanner.java:495) > at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1663) > at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1199) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:424) > at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78) > at com.sun.source.util.TreeScanner.visitBlock(TreeScanner.java:249) > at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:1048) > at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1199) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:424) > at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:91) > at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitClass(SemanticHighlighterBase.java:1124) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitClass(SemanticHighlighterBase.java:424) > at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:822) > at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1199) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:424) > at com.sun.source.util.TreeScanner.scan(TreeScanner.java:106) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:78) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitCompilationUnit(SemanticHighlighterBase.java:797) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.visitCompilationUnit(SemanticHighlighterBase.java:424) > at > com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:603) > at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82) > at > org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:69) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase$DetectorVisitor.scan(SemanticHighlighterBase.java:1199) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase.process(SemanticHighlighterBase.java:251) > at > org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:56) > at > org.netbeans.modules.java.editor.base.semantic.SemanticHighlighterBase.run(SemanticHighlighterBase.java:118) > at > org.netbeans.modules.parsing.impl.TaskProcessor.callParserResultTask(TaskProcessor.java:561) > [catch] 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:515) > 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) > {noformat} -- 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