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 182542 - ArrayIndexOutOfBoundsException: -1
Summary: ArrayIndexOutOfBoundsException: -1
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 180241 182543 182544 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-23 08:05 UTC by Jaromir Uhrik
Modified: 2010-03-31 12:53 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 166809


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jaromir Uhrik 2010-03-23 08:05:01 UTC
This bug was originally marked as duplicate of bug 138906, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201003220200)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.3-b01-101, Java(TM) SE Runtime Environment, 1.6.0_17-b04-248-9M3125
OS: Mac OS X

User Comments:
juhrik: -write following code:
public class NewClass{
    public void NewClass(String s){ System.out.println("s"); }
}
-go to the line with constructor and push Alt-Enter to invoke hint popup
-push Enter to activate hint

-->>Exception appears




Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException: -1
   at org.netbeans.modules.java.source.pretty.CharBuffer.eatAwayChars(CharBuffer.java:263)
   at org.netbeans.modules.java.source.pretty.VeryPretty.eatChars(VeryPretty.java:1705)
   at org.netbeans.modules.java.source.save.CasualDiff.copyTo(CasualDiff.java:3404)
   at org.netbeans.modules.java.source.save.CasualDiff.copyTo(CasualDiff.java:3392)
   at org.netbeans.modules.java.source.save.CasualDiff.diffMethodDef(CasualDiff.java:655)
   at org.netbeans.modules.java.source.save.CasualDiff.diffTreeImpl(CasualDiff.java:2944)
Comment 1 Jaromir Uhrik 2010-03-23 08:46:57 UTC
*** Bug 182543 has been marked as a duplicate of this bug. ***
Comment 2 Jaromir Uhrik 2010-03-23 08:47:32 UTC
*** Bug 182544 has been marked as a duplicate of this bug. ***
Comment 3 Jan Lahoda 2010-03-23 15:23:40 UTC
Thanks for reproducible test case!

http://hg.netbeans.org/jet-main/rev/b8899a5fd223
Comment 4 Quality Engineering 2010-03-24 05:19:22 UTC
Integrated into 'main-golden', will be available in build *201003240200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/b8899a5fd223
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #182542: fixing an ArrayIndexOutOfBoundsException.
Comment 5 Jan Lahoda 2010-03-26 13:02:31 UTC
*** Bug 180241 has been marked as a duplicate of this bug. ***
Comment 6 Jaromir Uhrik 2010-03-31 12:53:15 UTC
Verified in the following build:
Product Version: NetBeans IDE Dev (Build 201003310201)
Java: 1.6.0_17; Java HotSpot(TM) 64-Bit Server VM 14.3-b01-101
System: Mac OS X version 10.5.8 running on x86_64; MacRoman; en_US (nb)