Details
-
Type: Bug
-
Status: Resolved
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 2.8.3
-
Fix Version/s: 2.11.1
-
Component/s: PicoContainer (Java)
-
Labels:None
-
Number of attachments :
Description
We get this error intermittently when running our unit tests:
java.lang.ArrayIndexOutOfBoundsException: 11
at java.util.ArrayList.add(ArrayList.java:352)
at org.picocontainer.DefaultPicoContainer.addOrderedComponentAdapter(DefaultPicoContainer.java:465)
at org.picocontainer.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:585)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:535)
at org.picocontainer.DefaultPicoContainer.getComponent(DefaultPicoContainer.java:547)
It has been happening at least from 2.6 ~ 2.8.3. Interestingly enough, when it happens, two tests fail with the same error, even though we recreate the container for every test method.
Issue Links
- is related to
-
SONAR-3275 ArrayIndexOutOfBoundsException in URL /chart
It looks like you're triggering a race condition in addOrderedComponentAdapter(). I have attempted to fix this with a checkin with revisiong 5680. But I'm not 100% sure I've fixed all potential avenues for this condition.
If you would please give this version a try and let us know how it goes, we'd appreciate it. Thanks.