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.
Steps to reproduce: 1. Create the following Java source file: public class Test { static class Foo implements Comparable<String> static { } } 2. Move caret on the incomplete definition of Foo. 3. Press Alt+Enter and then press Enter to execute "Implement all abstract methods". -> The following exception is thrown: java.lang.StringIndexOutOfBoundsException: String index out of range: 125 at java.lang.String.charAt(String.java:687) at org.netbeans.modules.java.source.save.CasualDiff.diffClassDef(CasualDiff.java:322) at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:2223) at org.netbeans.modules.java.source.save.CasualDiff.diffList(CasualDiff.java:1966) at org.netbeans.modules.java.source.save.CasualDiff.diffTopLevel(CasualDiff.java:135) at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:2217) at org.netbeans.modules.java.source.save.CasualDiff.diff(CasualDiff.java:88) at org.netbeans.modules.java.source.save.Commit.commit(Commit.java:176) at org.netbeans.modules.java.source.save.Commit.visitCompilationUnit(Commit.java:129) Caused: QueryException at org.netbeans.modules.java.source.query.Query.error(Query.java:117) at org.netbeans.modules.java.source.save.Commit.visitCompilationUnit(Commit.java:137) at org.netbeans.modules.java.source.save.Commit.visitCompilationUnit(Commit.java:51) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:476) at org.netbeans.modules.java.source.engine.RootTree.accept(RootTree.java:60) at org.netbeans.modules.java.source.query.Query.apply(Query.java:95) at org.netbeans.modules.java.source.save.Commit.commit(Commit.java:85) at org.netbeans.api.java.source.WorkingCopy.getChanges(WorkingCopy.java:207) at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:785) at org.netbeans.modules.java.hints.errors.ImplementAllAbstractMethods$FixImpl.implement (ImplementAllAbstractMethods.java:165) at org.netbeans.modules.editor.hints.HintsUI$1.run(HintsUI.java:542) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539) [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964) Found with build 200707171200.
Fixed a java hints issue which caused no errors and hints displayed for given file. Checking in src/org/netbeans/modules/java/hints/infrastructure/ErrorHintsProvider.java; /cvs/java/hints/src/org/netbeans/modules/java/hints/infrastructure/ErrorHintsProvider.java,v <-- ErrorHintsProvider.java new revision: 1.6; previous revision: 1.5 done Now it's reproduceable, it's up to Pavel to decide if we will fix the Diff or we can disable the hint for such a broken file.
Not sure, currently the exception is no longer reproducible, but the abstract methods are generated to top level class and line with declaration is duplicated. Positions are totally broken. I think now it can be considered as P4 bug, because it doesn't throw any exception and it does not do any mismatch in source.
Overtake.
Resolving all issues with milestone "future" as LATER. If you feel strongly that it should be implemented please reopen and set the target milestone to "next".
NetBeans.org Migration: changing resolution from LATER to WONTFIX