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 253234 - StringIndexOutOfBoundsException: String index out of range: 7
Summary: StringIndexOutOfBoundsException: String index out of range: 7
Status: RESOLVED FIXED
Alias: None
Product: web
Classification: Unclassified
Component: HTML Editor (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Milutin Kristofic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-29 12:18 UTC by seyit
Modified: 2015-07-24 01:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 178740


Attachments
stacktrace (2.18 KB, text/plain)
2015-06-29 12:18 UTC, seyit
Details

Note You need to log in before you can comment on or make changes to this bug.
Description seyit 2015-06-29 12:18:47 UTC
Build: NetBeans IDE 8.0.2 (Build 201411181905)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.5-b02, Java(TM) SE Runtime Environment, 1.8.0_05-b13
OS: Windows 7

User Comments:
GUEST: I do not know what I was doing exactly because i do not know when the problem occurs.

GUEST: programming

dataskills: A  closing style tag was auto-completed, and I accidentally typed a back-tick in the tag (like this: </style`>) and then this error popped up.

GUEST: scrip

GUEST: Typing out a close HTML tag, then mistyped a period (.) instead of a right angle bracket (>).

GUEST: While editing js code

seyit: StringIndexOutOfBoundsException: String index out of range: 7

GUEST: I was trying to write "</script>", and after I've written "<script" I pressed "." instead of ">" and it gave me that error.




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 7
   at java.lang.String.charAt(String.java:646)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery.queryHtmlEndTagInEmbeddedCode(HtmlCompletionQuery.java:190)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery.access$100(HtmlCompletionQuery.java:91)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery$1.run(HtmlCompletionQuery.java:142)
   at org.netbeans.editor.BaseDocument.render(BaseDocument.java:1391)
   at org.netbeans.modules.html.editor.completion.HtmlCompletionQuery.run(HtmlCompletionQuery.java:127)
Comment 1 seyit 2015-06-29 12:18:51 UTC
Created attachment 154425 [details]
stacktrace
Comment 2 Milutin Kristofic 2015-07-23 15:29:29 UTC
Thank you for reproducible steps with </script >

Fixed in http://hg.netbeans.org/web-main/rev/848fe1c2d8f2
Comment 3 Quality Engineering 2015-07-24 01:18:57 UTC
Integrated into 'main-silver', will be available in build *201507240001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/848fe1c2d8f2
User: Milutin Kristofic <mkristofic@netbeans.org>
Log: #253234 - StringIndexOutOfBoundsException: String index out of range: 7