Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Fixed
-
Affects Version/s: 1.2.21
-
Fix Version/s: 1.3.0
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
Hello,
I use MVEL for dynamic translation and I use this sentence lots of time :
" object.list.remove( object.list.indexOf(el1)); "
but it doesn't work, I have this error :
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
at org.mvel.util.FastList.remove(FastList.java:61)
... 35 more
FastList class have a big error in the remove method :
public Object remove(int i) {
Object old = elements[i];
for (int c = i + 1; c != size; c--) {
---------- this condition doesn't work at all !!!!
elements[c - 1] = elements[c];
}
size--;
return old;
}
Fixed in trunk.