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.
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)
Created attachment 128812 [details] stacktrace
The same exception occurs if I type view. then press Ctrl + Space and then press for example a.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/8ea96411a725
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.
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!