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 195703 - [70cat] ArrayIndexOutOfBoundsException: 52
Summary: [70cat] ArrayIndexOutOfBoundsException: 52
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on: 197676
Blocks:
  Show dependency tree
 
Reported: 2011-02-19 18:30 UTC by eltony81
Modified: 2011-04-12 20:20 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 170838


Attachments
stacktrace (3.82 KB, text/plain)
2011-02-19 18:31 UTC, eltony81
Details

Note You need to log in before you can comment on or make changes to this bug.
Description eltony81 2011-02-19 18:30:59 UTC
Build: NetBeans IDE 7.0 Beta 2 (Build 201102140001)
VM: Java HotSpot(TM) 64-Bit Server VM, 17.1-b03-307, Java(TM) SE Runtime Environment, 1.6.0_22-b04-307-10M3261
OS: Mac OS X

User Comments:
GUEST: clicked the hint when there was 'incompatible types' parse error found




Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: 52
   at org.openide.awt.HtmlRenderer.findColor(HtmlRenderer.java:1174)
   at org.openide.awt.HtmlRenderer._renderHTML(HtmlRenderer.java:847)
   at org.openide.awt.HtmlRenderer.renderHTML(HtmlRenderer.java:528)
   at org.netbeans.modules.editor.hints.borrowed.ListCompletionView.getPreferredWidth(ListCompletionView.java:378)
   at org.netbeans.modules.editor.hints.borrowed.ListCompletionView.access$600(ListCompletionView.java:95)
   at org.netbeans.modules.editor.hints.borrowed.ListCompletionView$RenderComponent.getPreferredSize(ListCompletionView.java:362)
Comment 1 eltony81 2011-02-19 18:31:04 UTC
Created attachment 106191 [details]
stacktrace
Comment 2 Stanislav Aubrecht 2011-02-21 11:52:13 UTC
i've added a check for broken HTML code in HtmlRenderer class (core-main 14b8f8b081b3) but editor team should review the hints implementation for possible other cases of invalid HTML code.
Comment 3 Stanislav Aubrecht 2011-02-21 12:12:33 UTC
just an afterthought - the broken HTML might be caused by generic in the hint message, e.g. List<Color> is then being interpreted as html code <color="cxxx"...
Comment 4 Jan Lahoda 2011-02-21 16:21:44 UTC
Yes, that is most likely the problem. Thanks. I patched the hint for now:
http://hg.netbeans.org/jet-main/rev/8beca9051487

Thanks for the report.
Comment 5 Quality Engineering 2011-02-22 05:26:39 UTC
Integrated into 'main-golden', will be available in build *201102220001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/14b8f8b081b3
User: S. Aubrecht <saubrecht@netbeans.org>
Log: #195703 - check for broken HTML
Comment 6 Quality Engineering 2011-02-25 05:38:08 UTC
Integrated into 'main-golden', will be available in build *201102250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/8beca9051487
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #195703: [ChangeType hint] escape '<' for the fix display name.