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.
[20040829] I have tried to paste a few lines of code into a jsp file (included) and got this exception. Until I closed the editor window the exception appeared again and again.
Created attachment 17226 [details] The JSP file
I have same exception with this scenarion (100% reproducible) 1) In a JSP include empty line at position 2 (between 2 <@page ... lines) 2) Paste (Ctrl-V) a text which doesn't end with a new line (e.g. 1 character) 3) Undo (Ctrl-Z) 4) EXCEPTION -- see attachment
Created attachment 17231 [details] java.lang.ArrayIndexOutOfBoundsException
I forgot to attach my exception - anyway it was the some as Karel got. Thank you Karle very much for the reproducible scenario. Great work!
I likely found a minimal JSP file (attaching) on which the AIOOBE can be reproduced. To reproduce place the cursor to the second line, press a letter key - for example 'a' and then use editor Undo. The exception is then thrown.
Created attachment 17241 [details] The minimalistic JSP file on which the AIOOBE can be reproduced
It seems that the problem is in org.netbeans.editor.FixLineSyntaxState.fixSyntaxStateInfos(undo) method. When the undo operation is performed the method is called with undo=true argument. Then maybeMatchLineIndex variable on line 328 is wrongly set (the value is set to 1 (for the particualar case describe above), what causes that the state infos are not updated). Then the page parser fails with the AIIOBE due to wrong state infos. Reassigning to editor module.
I'll fix this.
Fixed in trunk: Checking in libsrc/org/netbeans/editor/FixLineSyntaxState.java; /cvs/editor/libsrc/org/netbeans/editor/FixLineSyntaxState.java,v <-- FixLineSyntaxState.java new revision: 1.3; previous revision: 1.2