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.