Bug 236685 - IndexOutOfBoundsException: end < start (21212 < 21237)
IndexOutOfBoundsException: end < start (21212 < 21237)
Status: NEW
Product: java
Classification: Unclassified
Component: Compiler
7.4
All All
: P3 (vote)
: TBD
Assigned To: Dusan Balek
issues@java
EXCEPTIONS_REPORT
:
: 237047 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-03 09:25 UTC by Jan Lahoda
Modified: 2013-10-18 14:32 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (10.52 KB, text/plain)
2013-10-03 09:25 UTC, Jan Lahoda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Lahoda 2013-10-03 09:25:09 UTC
Build: NetBeans IDE Dev (Build 20130927-1f17c52d6246)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_11-b21
OS: Linux

User Comments:
GUEST: Created .java file with several (default visibility) interfaces and classes. Error on editing method which implements an interface in the same file.

jlahoda: if (writer != null)
            if (writer != null)
                if (writer != null)
                    if (writer != null)
                        else
                        
                else
                    if (writer != null);




Stacktrace: 
java.lang.IndexOutOfBoundsException: end < start (21212 < 21237)
   at org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(ErrorDescriptionFactory.java:231)
   at org.netbeans.modules.java.hints.EmptyStatements.createErrorDescription(EmptyStatements.java:213)
   at org.netbeans.modules.java.hints.EmptyStatements.run(EmptyStatements.java:175)
   at org.netbeans.modules.java.hints.legacy.spi.RulesManager$WorkerImpl.createErrors(RulesManager.java:411)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.runHint(HintsInvoker.java:790)
   at org.netbeans.modules.java.hints.spiimpl.hints.HintsInvoker.access$400(HintsInvoker.java:111)
Comment 1 Jan Lahoda 2013-10-03 09:25:12 UTC
Created attachment 140752 [details]
stacktrace
Comment 2 Svata Dedic 2013-10-18 14:32:05 UTC
In this example, the SourcePositions.getEndPosition() returns an invalid value. The returned value for statement "if (writer != null);" is equal to errorPosition for some reason - recorded in the endPosMap.
Comment 3 Svata Dedic 2013-10-18 14:32:44 UTC
*** Bug 237047 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo