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 262783 - IndexOutOfBoundsException: end < start (3123 < 3128)
Summary: IndexOutOfBoundsException: end < start (3123 < 3128)
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-12 16:55 UTC by ytn01
Modified: 2016-07-25 12:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 222230


Attachments
stacktrace (2.70 KB, text/plain)
2016-07-12 16:55 UTC, ytn01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ytn01 2016-07-12 16:55:07 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.92-b14, Java(TM) SE Runtime Environment, 1.8.0_92-b14
OS: Mac OS X

User Comments:
GUEST: N/A

GUEST: I don't know where this error comes from.

ytn01: Was just editing a Java file.
Exception occurend when expanding a collapsed code block.

GUEST: I reverted a file.

GUEST: check this dear

GUEST: <???????????????>??java

GUEST: Editing and running code.




Stacktrace: 
java.lang.IndexOutOfBoundsException: end < start (3123 < 3128)
   at org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(ErrorDescriptionFactory.java:265)
   at org.netbeans.spi.java.hints.ErrorDescriptionFactory.forTree(ErrorDescriptionFactory.java:131)
   at org.netbeans.spi.java.hints.ErrorDescriptionFactory.forTree(ErrorDescriptionFactory.java:114)
   at org.netbeans.modules.java.hints.suggestions.ConvertIfToSwitch.convertIfToSwitch(ConvertIfToSwitch.java:164)
   at sun.reflect.GeneratedMethodAccessor158.invoke(GeneratedMethodAccessor158.java:0)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Comment 1 ytn01 2016-07-12 16:55:10 UTC
Created attachment 160358 [details]
stacktrace
Comment 2 Milutin Kristofic 2016-07-13 11:11:01 UTC
This is coming from java.hints. Can you please look at this.
org.netbeans.spi.java.hints.ErrorDescriptionFactory.forTree(ErrorDescriptionFactory.java:131)
Comment 3 Svata Dedic 2016-07-25 12:17:14 UTC
The error came from a hint that suggest to convert a chain of ifs to switch. Could anyone post a sample source code, which caused this defect ? I cannot reproduce it with 8.1. The trigger is a series of 3 or more ifs on the same expression, using == or equals, using either primitive type or enum values.