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.
[ JDK VERSION : J2SE 1.4.2 ] NB 3.6 Beta 1 build on JDK 1.4.2 on Linux RH7.3, KDE. After deleting couple of lines and continued editing: java.lang.IndexOutOfBoundsException: Invalid line index=299 >= lineCount=299 at org.netbeans.editor.LineRootElement.getElement(LineRootElement.java:54) at org.openide.text.NbDocument$DocumentRenderer.run(NbDocument.java:631) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:883) at org.openide.text.NbDocument$DocumentRenderer.renderToInt(NbDocument.java:609) at org.openide.text.NbDocument.findLineOffset(NbDocument.java:142) at org.openide.text.DocumentLine$Set.getCurrent(DocumentLine.java:904) at org.netbeans.modules.java.ParserAnnotation.attachToLineSet(ParserAnnotation.java:133) at org.netbeans.modules.java.JavaEditor$5.run(JavaEditor.java:653) at org.netbeans.editor.BaseDocument.render(BaseDocument.java:883) at org.netbeans.modules.java.JavaEditor.processAnnotations(JavaEditor.java:659) at org.netbeans.modules.java.JavaEditor.access$300(JavaEditor.java:75) [catch] at org.netbeans.modules.java.JavaEditor$2.run(JavaEditor.java:346) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178) at java.awt.EventQueue.dispatchEvent(EventQueue.java:454) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137) at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
JavaEditor tries to attach the annotation to non-existent line. This needs to be fixed in the java module.
Cau Davide, it seems you deleted lines before the annotation was attached. It is bug in timing. I'll look at it.
Cau, as I said I have deleted couple of lines with imports and if I remember correctly pasted one line with import if it matters.
fixed in /cvs/java/src/org/netbeans/modules/java/JavaEditor.java,v1.153 /cvs/java/src/org/netbeans/modules/java/ParserAnnotation.java,v1.6
*** Issue 40253 has been marked as a duplicate of this issue. ***
verified