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 215491

Summary: StringIndexOutOfBoundsException: String index out of range: 0
Product: javaee Reporter: Exceptions Reporter <exceptions_reporter>
Component: JSPAssignee: Marek Fukala <mfukala>
Status: RESOLVED FIXED    
Severity: normal CC: fleka, mago_ebon, sunbiz, TheloniousBonk
Priority: P3    
Version: 7.2   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 190707
Attachments: stacktrace

Description Exceptions Reporter 2012-07-13 05:11:38 UTC
This bug was originally marked as duplicate of bug 209447, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build nbms-and-javadoc-9345-on-20120711)
VM: Java HotSpot(TM) 64-Bit Server VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows 7

User Comments:
GUEST: Writting code in a JSP File

GUEST: Same problem occurred even with new updates??? Highlighed text on JSP/JS/HTML file all caused this error!

GUEST: -attempted to update an index.jsp file by 1) selecting some test and 2) trying to type over it.
-just typing code (w/ out selecting) works fine.

mago_ebon: While editing a jsp file, everytime the cursor had to be relocated by system, it sends this message.

GUEST: Problem occurred when I filling line
<input type="text">
 and when I removed word text (with backspace) exepction appears

sunbiz: Editing JSP file...inside a scriptlet

TheloniousBonk: Highlighted a single character and typed the uppercase version of that character.

GUEST: Highlighted text and typing caused this issue on HTML/JSP/JS files

GUEST: editing a JSP file

GUEST: -attemped to update an index.jsp file




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: 0
   at java.lang.String.charAt(String.java:695)
   at org.netbeans.modules.web.core.syntax.JSPKit$JspDefaultKeyTypedAction.replaceSelection(JSPKit.java:495)
   at org.netbeans.editor.BaseKit$DefaultKeyTypedAction$2.run(BaseKit.java:1160)
   at org.netbeans.editor.GuardedDocument.runAtomicAsUser(GuardedDocument.java:347)
   at org.netbeans.editor.BaseKit$DefaultKeyTypedAction.actionPerformed(BaseKit.java:1151)
   at org.netbeans.editor.ext.ExtKit$ExtDefaultKeyTypedAction.actionPerformed(ExtKit.java:1076)
Comment 1 Exceptions Reporter 2012-07-13 05:11:41 UTC
Created attachment 121992 [details]
stacktrace
Comment 2 Marek Fukala 2014-07-29 09:55:22 UTC
looks like fixed, last report from 120711