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 268113

Summary: IndexOutOfBoundsException: Index: 1, Size: 1
Product: editor Reporter: wojtekxm
Component: Formatting & IndentationAssignee: Dusan Balek <dbalek>
Status: RESOLVED FIXED    
Severity: normal CC: GastonMF
Priority: P2    
Version: 8.1   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 223101
Attachments: stacktrace

Description wojtekxm 2016-09-20 10:49:12 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.101-b13, Java(TM) SE Runtime Environment, 1.8.0_101-b13
OS: Windows 10

User Comments:
GUEST: netbean auto create report about problem

GUEST: IndexOutOfBoundsException: Index: 1, Size: 1

GUEST: Help to solve

GUEST: IndexOutOfBoundsException: Index: 1, Size: 1

GUEST: a

wojtekxm: I was creating a JSP file with if-else blocks. I was using auto-formatting (Alt+Shift+F) but the braces from if and else blocks were not aligned the way I wanted.

GUEST: !




Stacktrace: 
java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
   at java.util.LinkedList.checkElementIndex(LinkedList.java:555)
   at java.util.LinkedList.get(LinkedList.java:476)
   at org.netbeans.modules.java.source.save.Reindenter.getNewIndent(Reindenter.java:600)
   at org.netbeans.modules.java.source.save.Reindenter.reindent(Reindenter.java:167)
   at org.netbeans.modules.editor.indent.TaskHandler$MimeItem.runTask(TaskHandler.java:555)
   at org.netbeans.modules.editor.indent.TaskHandler.runTasks(TaskHandler.java:316)
Comment 1 wojtekxm 2016-09-20 10:49:14 UTC
Created attachment 162126 [details]
stacktrace
Comment 2 Exceptions Reporter 2017-06-28 02:52:32 UTC
This bug already has 20 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=223101
Comment 3 Dusan Balek 2017-07-21 10:56:44 UTC
Fixed in jet-main.

http://hg.netbeans.org/jet-main/rev/4d336579133c
Comment 4 Quality Engineering 2017-07-23 02:10:41 UTC
Integrated into 'main-silver', will be available in build *201707230001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4d336579133c
User: Dusan Balek <dbalek@netbeans.org>
Log: Issue #268113 - IndexOutOfBoundsException - fixed.