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 223700 - IndexOutOfBoundsException: end < start (208 < 212)
Summary: IndexOutOfBoundsException: end < start (208 < 212)
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.3
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-12 08:59 UTC by Jiri Prox
Modified: 2012-12-17 12:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 196438


Attachments
stacktrace (3.18 KB, text/plain)
2012-12-12 08:59 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2012-12-12 08:59:41 UTC
Build: NetBeans IDE Dev (Build 201212120001)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b18
OS: Windows 7

User Comments:
jiriprox: IOOBE when editing file




Stacktrace: 
java.lang.IndexOutOfBoundsException: end < start (208 < 212)
   at org.netbeans.spi.editor.hints.ErrorDescriptionFactory.createErrorDescription(ErrorDescriptionFactory.java:265)
   at org.netbeans.spi.java.hints.ErrorDescriptionFactory.forTree(ErrorDescriptionFactory.java:126)
   at org.netbeans.modules.java.hints.OrganizeMembers.checkMembers(OrganizeMembers.java:123)
   at sun.reflect.GeneratedMethodAccessor112.invoke(GeneratedMethodAccessor112.java:0)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:601)
Comment 1 Jiri Prox 2012-12-12 08:59:43 UTC
Created attachment 129243 [details]
stacktrace
Comment 2 Jiri Prox 2012-12-12 09:14:58 UTC
Steps to reproduce:
1) have project with Lombok and following class:
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package foo;

import lombok.Data;
import lombok.Getter;

@Data
public class AbstractClass {

    String x = "";
    @Getter
    private final int i;

    public void neco(int x) {
        int aa = x;
        x = 34;
        String aaa = "a";
        
    }
}

2) select whole body of method 'neco'
3) delete it (here occurs issue 223701)
4) undo the changes and press enter
-> exception is thrown
Comment 3 Jan Lahoda 2012-12-14 12:52:48 UTC
http://hg.netbeans.org/jet-main/rev/5ca0ccb53f41
Comment 4 Jan Lahoda 2012-12-14 13:02:49 UTC
Still does not seem to work after partial reparse.
Comment 5 Jan Lahoda 2012-12-14 16:04:26 UTC
http://hg.netbeans.org/jet-main/rev/71787dab10f4
Comment 6 Quality Engineering 2012-12-17 12:40:23 UTC
Integrated into 'main-golden', will be available in build *201212170919* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/5ca0ccb53f41
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #223700: ignoring synthetic members when doing organize members to support lombok-generated methods/fields.