IPP 0.4 - ArrayIndexOutOfBoundsException with generics
Using IPP 0.4 and IDEA #859. I was just trying to test some generics
constructions, and I was deleting part of a line of code so that my code
currently looks like this:
-
package test;
import java.util.ArrayList;
/**
Created by IntelliJ IDEA.
User: Jonas Kvarnström
Date: 2003-jul-19
Time: 13:40:04
To change this template use Options | File Templates.
*/
public class TestIntroduce
{
public static void main(String[] args) {
rayList]]>;
}
}
-
Now I get an ArrayIndexOutOfBoundsException each time I put the cursor
at the start of "rayList". This is reproducable after restarting IDEA.
java.lang.ArrayIndexOutOfBoundsException: 0
at
com.siyeh.ipp.decls.SimplifyDeclarationPredicate.satisfiedBy(SimplifyDeclarationPredicate.java:16)
at com.siyeh.ipp.Intention.findMatchingElement(Intention.java:112)
at com.siyeh.ipp.Intention.isAvailable(Intention.java:126)
at com.intellij.codeInsight.d.a.cf.c(cf.java:66)
at com.intellij.codeInsight.d.a.cf.b(cf.java:96)
at com.intellij.codeInsight.d.a.co.run(co.java:3)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at com.intellij.ide.s.a(s.java:96)
at com.intellij.ide.s.dispatchEvent(s.java:99)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
请先登录再写评论。
No big surprise. I haven't used Java generics even in samples, and the PSI is (understandably) in flux in that area, so errors here are certainly to be expected. Probably be a few weeks till I get to it (releasing the frigging enormous InspectionGadgets plugin on Thursday, and expecting a raft of bugs and feature reuest), but I will keep this on my "to fix" list.
BTW: love the
To change this template use Options | File Templates.
in your class headers. Nice to know I'm not the only lazy one out there.