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 220832 - StringIndexOutOfBoundsException: String index out of range: -18
Summary: StringIndexOutOfBoundsException: String index out of range: -18
Status: RESOLVED 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-10-25 11:06 UTC by aldobrucale
Modified: 2012-10-31 02:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 194072


Attachments
stacktrace (2.33 KB, text/plain)
2012-10-25 11:06 UTC, aldobrucale
Details
stacktrace (2.33 KB, text/plain)
2012-10-29 16:12 UTC, Sergey Petrov
Details
place cursor after 'new ' and cc (311 bytes, text/x-java)
2012-10-29 16:19 UTC, Sergey Petrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description aldobrucale 2012-10-25 11:06:56 UTC
Build: NetBeans IDE Dev (Build 201210250001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.5-b02, Java(TM) SE Runtime Environment, 1.7.0_09-b05
OS: Linux

User Comments:
aldobrucale: ctrl-space in this line from commons-beanutils (attached source from a jar): 

 descriptors = new PropertyDescriptor[0];

The cursor was between "Property" and "Descriptor"




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -18
   at java.lang.String.substring(String.java:1911)
   at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.getSmartTypes(JavaCompletionProvider.java:4385)
   at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.access$2300(JavaCompletionProvider.java:138)
   at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery$Env.getSmartTypes(JavaCompletionProvider.java:5257)
   at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.insideNewClass(JavaCompletionProvider.java:1831)
   at org.netbeans.modules.editor.java.JavaCompletionProvider$JavaCompletionQuery.resolveCompletion(JavaCompletionProvider.java:672)
Comment 1 aldobrucale 2012-10-25 11:06:59 UTC
Created attachment 126537 [details]
stacktrace
Comment 2 Sergey Petrov 2012-10-29 16:12:11 UTC
Created attachment 126734 [details]
stacktrace

cc in a class
Comment 3 Sergey Petrov 2012-10-29 16:19:21 UTC
Created attachment 126736 [details]
place cursor after 'new ' and cc
Comment 4 Dusan Balek 2012-10-29 19:01:17 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/cb9cb5be4a87
Comment 5 Quality Engineering 2012-10-31 02:56:24 UTC
Integrated into 'main-golden', will be available in build *201210310001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/cb9cb5be4a87
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #220832: StringIndexOutOfBoundsException: String index out of range - fixed.