NPE in BufferedEngineContainer

Description

------------------------------------------------------------------------------- Test set: com.octo.captcha.engine.bufferedengine.SimpleBufferedEngineContainerTest
------------------------------------------------------------------------------- Tests run: 5, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 12.61 sec <<< FAILURE!
testSwapCaptchasFromPersistentToVolatileMemory(com.octo.captcha.engine.bufferedengine.SimpleBufferedEngineContainerTest) Time elapsed: 0.016 sec <<< ERROR!
java.lang.NullPointerException: Attempted to add null object to buffer
at org.apache.commons.collections.buffer.UnboundedFifoBuffer.add(UnboundedFifoBuffer.java:176)
at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
at com.octo.captcha.engine.bufferedengine.buffer.MemoryCaptchaBuffer.putAllCaptcha(MemoryCaptchaBuffer.java:136)
at com.octo.captcha.engine.bufferedengine.BufferedEngineContainer.swapCaptchasFromPersistentToVolatileMemory(BufferedEngineContainer.java:213)
at com.octo.captcha.engine.bufferedengine.BufferedEngineContainerTestAbstract.testSwapCaptchasFromPersistentToVolatileMemory(BufferedEngineContainerTestAbstract.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)

Environment

None

Assignee

AntoineV

Reporter

AntoineV

Labels

None

Components

Fix versions

Affects versions

Priority

Major
Configure