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 256688 - StringIndexOutOfBoundsException: String index out of range: -9
Summary: StringIndexOutOfBoundsException: String index out of range: -9
Status: RESOLVED DUPLICATE of bug 226498
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-19 12:24 UTC by stefan79
Modified: 2016-04-28 02:03 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 221252


Attachments
stacktrace (5.25 KB, text/plain)
2015-11-19 12:24 UTC, stefan79
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stefan79 2015-11-19 12:24:10 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.60-b23, Java(TM) SE Runtime Environment, 1.8.0_60-b27
OS: Windows 8.1

User Comments:
stefan79: Exception occured while editing in a java-file.




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -9
   at java.lang.String.substring(String.java:1931)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTopLevel(CasualDiff.java:588)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl0(CasualDiff.java:4951)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl(CasualDiff.java:4873)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:4805)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTree(CasualDiff.java:4788)
Comment 1 stefan79 2015-11-19 12:24:12 UTC
Created attachment 157410 [details]
stacktrace
Comment 2 Jaroslav Havlin 2015-11-19 12:59:18 UTC
Reassigning to java/Source. Please evaluate.
Comment 3 Svata Dedic 2016-04-26 13:10:48 UTC
Marking as duplicate. I added more diagnostic output in jet-main#f1cb612082e7. I used the origtext found in log to recreate the environment but I could not reproduce the defect. Part of the formatting optiosn did not print properly, so I've extended the output.

*** This bug has been marked as a duplicate of bug 226498 ***
Comment 4 Quality Engineering 2016-04-28 02:03:01 UTC
Integrated into 'main-silver', will be available in build *201604280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/f1cb612082e7
User: Svata Dedic <sdedic@netbeans.org>
Log: #226498, #256688: diagnostic output added