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.
The exception thrown in the issue http://www.netbeans.org/issues/show_bug.cgi?id=33040 just mentions java.lang.ArrayIndexOutOfBoundsException however there is no additional information of what line index was requested and why it is invalid (less than zero or past the last line in the document). This issue adds the diagnostics in order to find the cause of the exception. There is no functionality being added or changed. I'm entering this as P1 in order to put this into release35 where the problem was identified.
Fixed in maintrunk: Checking in libsrc/org/netbeans/editor/LineRootElement.java; /cvs/editor/libsrc/org/netbeans/editor/LineRootElement.java,v <-- LineRootElement.java new revision: 1.5; previous revision: 1.4 done
Diff: http://editor.netbeans.org/source/browse/editor/libsrc/org/netbeans/editor/LineRootElement.java.diff?r1=1.4&r2=1.5
Created attachment 10136 [details] Binary patch - please copy the class(es) into nb-editor.jar manually
Mato, could you please review the fix? The code was originally present in the source but it was commented out so I've uncommented it and improved slightly.
I approve the fix.
The patch does not add any new functionality it just adds pre-checking of the correctness of the requested line index and adds explanation why the given line index is invalid to the exception's text.
approved for 3.5
Integrated into release35: Checking in libsrc/org/netbeans/editor/LineRootElement.java; /cvs/editor/libsrc/org/netbeans/editor/LineRootElement.java,v <-- LineRootElement.java new revision: 1.4.2.1; previous revision: 1.4 done
Verified patch in nevada build 030422.