Bug at Arraylist.size()
Has anyone experienced problems with the ArrayList. I think I have found some kind of bug, but I am not sure it is a Java problem. I am using:
Intel Centrino Dothan
java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
Eclipse SDK Version: 3.2.1
I have a NullPointerException, on a cycle like this:
for( Object a : objectList ) a.doSomething();
objectList is a ArrayList. I used the eclipse debugger to found the problem: it shows an ArrayList with 10 empty slots, but with the size set to 1. How is this possible?
Thank you all in advance,