TransactionStateDiff incorrectly calculating getCount
In updating the PropertyDataStore implementation of FeatureStore I ran into a case where the ProperyDataStore.getCount method was returning -1; rather than calling super.
The super class, AbstractFeatureStore implements getCount by:
1. using AbstractDataStore.getCount to generate the total number of features present at the file level on Transaction.AUTO_COMMIT
2. Modifying this total based on the contents of TransactionStateDiff
(ie removes -1 from the total, adds increase the total, modifications do not change the
The problem is that this work produces the wrong result as shown by the transaction independence test implemented by PropertyDataStoreTest.
For now the Trivial workaround is to return -1; and not engage the above code. No word on if ShapefileDataStore is effected.
Verified that this is fixed for ContentDataStore; marking as cannot reproduce since AbstractDataStore is removed
CodeHaus Comment From: jgarnett - Time: Wed, 7 Dec 2011 19:46:41 -0600
Andrea I think you indicated a fix for this on IRC?