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 131552 - StringIndexOutOfBoundsException 0 in html editor
Summary: StringIndexOutOfBoundsException 0 in html editor
Status: VERIFIED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 131666 132601 132907 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-30 20:07 UTC by lenemyt
Modified: 2009-05-18 10:47 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Patch (1.49 KB, patch)
2008-03-30 20:24 UTC, lenemyt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lenemyt 2008-03-30 20:07:56 UTC
AIOOBE when any tag have attribute that starts with 'on' without value or tag 'a' have attribute 'href' without value,
for example:

<input onclick>
or
<a href></a>
Comment 1 lenemyt 2008-03-30 20:16:24 UTC
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
        at java.lang.String.charAt(String.java:687)
        at org.netbeans.modules.html.editor.coloring.EmbeddingUpdater.createEmbedding(EmbeddingUpdater.java:239)
        at org.netbeans.modules.html.editor.coloring.EmbeddingUpdater.startTag(EmbeddingUpdater.java:153)
        at org.netbeans.modules.html.editor.coloring.EmbeddingUpdater.parsingFinished(EmbeddingUpdater.java:120)
        at org.netbeans.editor.ext.html.parser.SyntaxParser.notifyParsingFinished(SyntaxParser.java:238)
        at org.netbeans.editor.ext.html.parser.SyntaxParser.parse(SyntaxParser.java:222)
        at org.netbeans.editor.ext.html.parser.SyntaxParser.access$200(SyntaxParser.java:69)
        at org.netbeans.editor.ext.html.parser.SyntaxParser$4.run(SyntaxParser.java:151)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)
Comment 2 lenemyt 2008-03-30 20:24:53 UTC
Created attachment 59367 [details]
Patch
Comment 3 Marek Fukala 2008-04-01 19:56:21 UTC
*** Issue 131666 has been marked as a duplicate of this issue. ***
Comment 4 Marek Fukala 2008-04-06 18:07:54 UTC
fixed in revision c2761c392358, thanks for the patch!
Comment 5 Marek Fukala 2008-04-06 18:23:41 UTC
the fix's revision is b7fd605c1ec5
Comment 6 Martin Schovanek 2008-04-14 17:14:27 UTC
Annoying issue with trivial fix. Marking as release61 stopper.

Verified in trunk.

Marku please transplant the fix into release61 branch.
Comment 7 Andrei Badea 2008-04-15 08:48:05 UTC
Fix is very simple and doesn't seem to break anything.
Comment 8 Martin Schovanek 2008-04-15 08:59:42 UTC
Fixed in release61 by revision 9e6a312a4f1d.
Comment 9 Marek Fukala 2008-04-16 12:01:32 UTC
*** Issue 132907 has been marked as a duplicate of this issue. ***
Comment 10 Marek Fukala 2008-04-17 11:27:47 UTC
*** Issue 132601 has been marked as a duplicate of this issue. ***
Comment 11 Jindrich Sedek 2008-04-22 15:33:38 UTC
verified.
NetBeans IDE 6.1 (Build 200804210003)