Hello.
Recently we started to test custom UDIG application on GeoTools 10.x
and there is a serious bug in ContentFeatureSource that is used now by
ShapefileDataStore. It causes wrong logic in DiffFeatureReader when
in UDIG the content of the shapefile is changed in running
not-committed transaction.
In ContentFeatureSource we have:
if( !canTransact() && transaction != null && transaction !=
Transaction.AUTO_COMMIT) {
DiffTransactionState state = (DiffTransactionState)
getTransaction().getState(getEntry());
reader = new DiffFeatureReader<SimpleFeatureType,
SimpleFeature>(reader, state.getDiff());
}
and a fix looks easy one:
if( !canTransact() && transaction != null && transaction !=
Transaction.AUTO_COMMIT) {
DiffTransactionState state = (DiffTransactionState)
getTransaction().getState(getEntry());
reader = new DiffFeatureReader<SimpleFeatureType,
SimpleFeature>(reader, state.getDiff(), query.getFilter());
}
After this fix was applied, UDIG started to work correctly. If the
filter is not passed then problems are in DiffFeatureReader.queryDiff().
JDBCDataStore is not using this method (overrides it probably), so it
doesn't probably affect database DataStore (and it is proved that H2 is
working correctly for us).
If necessary I can give more detailed comments on the issue.
I didn't check 11 version of GeoTools.
Vitali Diatchkov,
Arbonaut Oy.
------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience. Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel