Issue Details (XML | Word | Printable)

Key: NUCCORE-1041
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Unassigned
Reporter: Gerrit Volkenborn
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
DataNucleus Core

SCOOperationQueue.isRemoveFollowedByAddOnSameSCO will not reset iterator causing NoSuchElementException

Created: 07/May/13 03:49 PM   Updated: 15/May/13 09:31 AM   Resolved: 07/May/13 04:07 PM
Component/s: None
Affects Version/s: 3.2.0.release, 3.2.1, 3.2.2
Fix Version/s: None

Datastore: Oracle


 Description  « Hide
Introduced with fix for NUCCORE-1005 (commit ID 16693):

The Method isAddFollowedByRemoveOnSameSCO correctly resets the iterator independently of the "addThenRemove" flag,
but the method isRemoveFollowedByAddOnSameSCO only resets it if the "removeThenAdd" flag is false, causing:

java.util.NoSuchElementException
        at java.util.ArrayList$Itr.next(ArrayList.java:794)
        at org.datanucleus.store.types.queued.SCOOperationQueue.performAll(SCOOperationQueue.java:109)
        at org.datanucleus.ExecutionContextImpl.flushSCOOperationsForBackingStore(ExecutionContextImpl.java:4072)

Sorry... tried my best to provide a test case with class B containing a set of another class A,
and then manipulating that set accordingly, but somehow I was unable to provoke this error so far! :/

However, by removing the if clause at line 194 and patching our datanucleus-core-3.2.2.jar, this issue was successfully eliminated.

Sort Order: Ascending order - Click to sort in descending order
Andy Jefferson added a comment - 07/May/13 04:07 PM
NUCCORE-1031, and SCOOperationQueue no longer exists besides. If its something else then you create a testcase