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 222631

Summary: IndexOutOfBoundsException: Index: 0, Size: 0
Product: java Reporter: mexer
Component: EditorAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: miibx5
Priority: P3    
Version: 7.3   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 194985
Attachments: stacktrace

Description mexer 2012-11-23 02:35:38 UTC
Build: NetBeans IDE 7.3 Beta 2 (Build 201211062253)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.3-b01, Java(TM) SE Runtime Environment, 1.7.0_07-b11
OS: Windows 7

User Comments:
mexer: I have this code
class Collar{
private int collarSize;
private Collar (int size){
collarSize=size;
}
}

then "Generate getters"  I didnt check any fields. When I check the only field it works perfecly




Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
   at java.util.ArrayList.RangeCheck(ArrayList.java:604)
   at java.util.ArrayList.get(ArrayList.java:382)
   at org.netbeans.modules.java.editor.codegen.GeneratorUtils.insertClassMembers(GeneratorUtils.java:368)
   at org.netbeans.modules.java.editor.codegen.GeneratorUtils.generateGettersAndSetters(GeneratorUtils.java:295)
   at org.netbeans.modules.java.editor.codegen.GetterSetterGenerator$1.run(GetterSetterGenerator.java:237)
   at org.netbeans.modules.java.editor.codegen.GetterSetterGenerator$1.run(GetterSetterGenerator.java:216)
Comment 1 mexer 2012-11-23 02:35:40 UTC
Created attachment 128289 [details]
stacktrace
Comment 2 Dusan Balek 2012-11-23 09:12:11 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/bf744db1a608
Comment 3 Quality Engineering 2012-11-24 13:08:04 UTC
Integrated into 'main-golden', will be available in build *201211240959* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/bf744db1a608
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #222631: IndexOutOfBoundsException: Index: 0, Size: 0 - fixed.