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.

Bug 33214

Summary: Better exception diagnostic regading issue 33040
Product: editor Reporter: Miloslav Metelka <mmetelka>
Component: -- Other --Assignee: issues@editor <issues>
Status: VERIFIED FIXED    
Severity: blocker CC: ttran
Priority: P1    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Binary patch - please copy the class(es) into nb-editor.jar manually

Description Miloslav Metelka 2003-04-24 12:37:12 UTC
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.
Comment 1 Miloslav Metelka 2003-04-24 13:11:12 UTC
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
Comment 3 Miloslav Metelka 2003-04-24 13:15:59 UTC
Created attachment 10136 [details]
Binary patch - please copy the class(es) into nb-editor.jar manually
Comment 4 Miloslav Metelka 2003-04-24 13:18:36 UTC
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.
Comment 5 Martin Roskanin 2003-04-24 13:27:38 UTC
I approve the fix.
Comment 6 Miloslav Metelka 2003-04-24 13:30:50 UTC
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.
Comment 7 _ ttran 2003-04-24 17:22:24 UTC
approved for 3.5
Comment 8 Miloslav Metelka 2003-04-24 17:55:42 UTC
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
Comment 9 ehucka 2003-04-24 18:46:09 UTC
Verified patch in nevada build 030422.