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 256277

Summary: StringIndexOutOfBoundsException: String index out of range: -1
Product: cnd Reporter: Vladimir Voskresensky <vv159170>
Component: Code ModelAssignee: Alexander Simon <alexvsimon>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 220863
Attachments: stacktrace

Description Vladimir Voskresensky 2015-10-30 14:10:14 UTC
This bug was originally marked as duplicate of bug 195902, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 8.1 (Build 20151023-6f36696ca29d)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.51-b03, Java(TM) SE Runtime Environment, 1.8.0_51-b16
OS: SunOS

User Comments:
vv159170: tried to rename #include from Navigator which corresponds to "-include " setting




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   at java.lang.String.<init>(String.java:192)
   at org.netbeans.modules.cnd.modelimpl.csm.core.FileBufferFile.getText(FileBufferFile.java:96)
   at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.getText(FileImpl.java:1668)
   at org.netbeans.modules.cnd.modelimpl.csm.core.FileImpl.getText(FileImpl.java:158)
   at org.netbeans.modules.cnd.modelimpl.csm.core.OffsetableBase.getText(OffsetableBase.java:156)
   at org.netbeans.modules.cnd.refactoring.support.CsmRefactoringUtils.getSimpleText(CsmRefactoringUtils.java:270)
Comment 1 Vladimir Voskresensky 2015-10-30 14:10:15 UTC
Created attachment 157065 [details]
stacktrace
Comment 2 Alexander Simon 2016-07-14 14:00:36 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/f3e680bf580a
Comment 3 Quality Engineering 2016-07-15 01:47:56 UTC
Integrated into 'main-silver', will be available in build *201607150002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f3e680bf580a
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #256277 StringIndexOutOfBoundsException: String index out of range: -1