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 240544

Summary: ArrayIndexOutOfBoundsException
Product: java Reporter: Martin Kanak <kanakmar>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 206619
Attachments: stacktrace

Description Martin Kanak 2014-01-16 14:10:03 UTC
This issue was reported manually by kanakmar.
It already has 1 duplicates 


Build: NetBeans IDE 8.0 Beta (Build 201401141042)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.0-b65, Java(TM) SE Runtime Environment, 1.8.0-ea-b123
OS: Windows 7

User Comments:
kanakmar: Exception appears after click on editor hint "Use Functional Operation"

Example code:

List<Instance> instance = loadInstances();
for(Instance i : instance){  //there is hint on this row and after click on it, the exception appears
...
}




Stacktrace: 
java.lang.ArrayIndexOutOfBoundsException
Comment 1 Martin Kanak 2014-01-16 14:10:04 UTC
Created attachment 144033 [details]
stacktrace
Comment 2 Marian Mirilovic 2014-02-05 08:09:52 UTC
...
java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.ArrayList.elementData(ArrayList.java:403)
	at java.util.ArrayList.get(ArrayList.java:416)
	at org.netbeans.modules.java.hints.jdk.mapreduce.Refactorer.isRefactorable(Refactorer.java:99)
	at org.netbeans.modules.java.hints.jdk.mapreduce.ForLoopToFunctionalHint$FixImpl.performRewrite(ForLoopToFunctionalHint.java:102)
	at org.netbeans.spi.java.hints.JavaFix$1.process(JavaFix.java:193)
...
Comment 3 Svata Dedic 2014-02-07 17:45:06 UTC

*** This bug has been marked as a duplicate of bug 239542 ***