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 223222 - StringIndexOutOfBoundsException: String index out of range: -397
Summary: StringIndexOutOfBoundsException: String index out of range: -397
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Dusan Balek
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-04 06:50 UTC by mienamoo
Modified: 2012-12-11 14:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 196055


Attachments
stacktrace (2.29 KB, text/plain)
2012-12-04 06:50 UTC, mienamoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-12-04 06:50:16 UTC
Build: NetBeans IDE Dev (Build 201212030001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Windows 7

User Comments:
mienamoo: I was editing a JFrame form's source code, and I invoked code completion on a OutlineView object.
This occurred specifically when I had typed
view.e
and pressed Ctrl + Space.




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -397
   at java.lang.String.substring(String.java:1911)
   at org.netbeans.modules.editor.java.JavaCodeTemplateFilter$1$1.run(JavaCodeTemplateFilter.java:115)
   at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:584)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:153)
   at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:137)
   at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:201)
Comment 1 mienamoo 2012-12-04 06:50:18 UTC
Created attachment 128812 [details]
stacktrace
Comment 2 mienamoo 2012-12-04 06:52:10 UTC
The same exception occurs if I type view. then press Ctrl + Space and then press for example a.
Comment 3 Dusan Balek 2012-12-04 12:24:57 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/8ea96411a725
Comment 4 Quality Engineering 2012-12-05 02:56:46 UTC
Integrated into 'main-golden', will be available in build *201212050001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8ea96411a725
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #223222: StringIndexOutOfBoundsException: String index out of range - fixed.
Comment 5 mienamoo 2012-12-11 14:27:37 UTC
With build 201212110001 I haven't been able to reproduce the issue, so I am marking it as verified. It was however intermittent to start with, so I can't say with certainty it won't happen again. :)

Thanks for the fix!