Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.1
-
None
-
None
-
None
-
Operating System: Linux
Platform: PC
-
33071
Description
If the circular fifo buffer is full and you remove an item, that is not the last
one, it breaks.
code example:
import java.io.*;
import org.apache.commons.collections.buffer.*;
class Stub {
public static void main(String[] args)
}
==============
output busted:
[]
[1]
[1, 2]
[1, 2, 3]
[1, 2, 3, 4]
adding 5
[1, 2, 3, 4, 5]
adding 6
[2, 3, 4, 5, 6]
fifo.isFull?:true
removing 3
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: -1
at
org.apache.commons.collections.buffer.BoundedFifoBuffer$1.remove(BoundedFifoBuffer.java:347)
at java.util.AbstractCollection.remove(AbstractCollection.java:255)
at Stub.main(Stub.java:40)