Community
Participate
Working Groups
Build Identifier: 3.0.0v20100614-1655 Presently the FastList method "remove" appears to have an error that causes it to not copy some of the elements while it builds the new array. The resulting list consequently contains at least one null element. This frequently causes issues in CDO when the transaction tries to notify its TransactionHandler objects, as it inevitably throws a NullPointerException. Given a test case: FastList(x, y, z) The operation FastList.remove(y) will result in a new list FastList(x, null) After looking at the code I see that line 84 reads if (i + 1 < length - 1) I believe that it should instead be if (i + 1 =< length - 1) Unfortunately this is very problematic in relation to CDO because CDOTransaction uses FastList and the act of removing a TransactionHandler will almost invariably induce instability by adding a null element and completely dropping a valid element from the list. Reproducible: Always Steps to Reproduce: 1. Create a FastList 2. Add 3 items to it 3. Remove the second item The underlying array will now contain a null item in the second index and will not have copied the third item.
Created attachment 176291 [details] Patch Funny that this slipped through the unit tests; the problem only occurs for removal of the penultimate element... Anyway, here's a patch including a testcase (added to FastListTest.java).
Committed to R3_0_maintenance
Moving all open problem reports to 4.0
Undoing accidental version change.
Closing.