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 138906 - ArrayIndexOutOfBoundsException: -1 from CharBuffer.eatAwayChars
Summary: ArrayIndexOutOfBoundsException: -1 from CharBuffer.eatAwayChars
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Compiler (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Dusan Balek
URL: http://statistics.netbeans.org/except...
Keywords:
: 128559 132166 135651 145910 146847 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-03 10:27 UTC by Jiri Prox
Modified: 2009-02-19 21:08 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 13862


Attachments
stacktrace (3.43 KB, text/plain)
2008-07-03 10:27 UTC, Jiri Prox
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2008-07-03 10:27:44 UTC
Build: NetBeans IDE Dev (Build 200807030102)
VM: Java HotSpot(TM) Client VM, 11.0-b12, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b25
OS: Linux, 2.6.22-15-generic, i386

User Comments: 
AIOOBE whne using insert code menu to override methods.
Comment 1 Jiri Prox 2008-07-03 10:27:53 UTC
Created attachment 63872 [details]
stacktrace
Comment 2 Jiri Prox 2008-07-03 10:29:51 UTC
Steps to reproduce:


public enum NewEnum implements NewInterface<String> {

    A(1) {
          // <- call override methods here
    };
    int x;

    private NewEnum(int x) {
        this.x = x;
    }

    public void perform() {
        throw new UnsupportedOperationException("Not supported yet.");
    }

    public String getIt() {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}
Comment 3 Jan Becicka 2008-07-18 10:23:21 UTC
*** Issue 135651 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2008-07-18 10:52:58 UTC
*** Issue 128559 has been marked as a duplicate of this issue. ***
Comment 5 Jan Becicka 2008-07-24 14:43:04 UTC
Problem seems to be (probably) in TreeInfo.getStartpos(), which is called from CasualDiff.java:1129 through getBounds()
and returns -1 for tree with tag IDENT (NewEnum).
Comment 6 Dusan Balek 2008-08-01 21:38:16 UTC
Fixed.

changeset f1b8e86d34d2 in main
details: http://hg.netbeans.org/main?cmd=changeset;node=f1b8e86d34d2
Comment 7 Quality Engineering 2008-08-02 15:57:43 UTC
Integrated into 'main-golden', available in build *200808021401* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/f1b8e86d34d2
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #138906: ArrayIndexOutOfBoundsException: -1 from CharBuffer.eatAwayChars - fixed.
Comment 8 Jan Becicka 2008-08-15 09:19:51 UTC
*** Issue 132166 has been marked as a duplicate of this issue. ***
Comment 9 Jan Becicka 2008-09-03 14:55:38 UTC
*** Issue 145910 has been marked as a duplicate of this issue. ***
Comment 10 Jan Becicka 2008-09-08 21:58:08 UTC
*** Issue 146517 has been marked as a duplicate of this issue. ***
Comment 11 Jiri Prox 2008-09-11 10:55:43 UTC
*** Issue 146847 has been marked as a duplicate of this issue. ***
Comment 12 Jan Becicka 2008-09-11 10:56:17 UTC
*** Issue 146847 has been marked as a duplicate of this issue. ***
Comment 13 Exceptions Reporter 2008-11-26 16:08:37 UTC
Reopening - reproduced in NetBeans IDE 6.5 (Build 200811100001)
http://statistics.netbeans.org/exceptions/detail.do?id=141881
Comment 14 Dusan Balek 2008-12-04 13:42:40 UTC
Fixed.

changeset e71e0954a21d in main
details: http://hg.netbeans.org/main?cmd=changeset;node=e71e0954a21d
Comment 15 Quality Engineering 2008-12-05 05:59:10 UTC
Integrated into 'main-golden', will be available in build *200812050201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/e71e0954a21d
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #138906: ArrayIndexOutOfBoundsException: -1 from CharBuffer.eatAwayChars - fixed.