Hi Vitali,
thank you for the report. Do you have time to create also a test,
and make a pull request with the suggested change and
test?
Cheers
Andrea
On Thu, Feb 13, 2014 at 5:34 PM, Vitali Dyachkov <[email protected]>wrote:
> 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
>
--
== Our support, Your Success! Visit http://opensdi.geo-solutions.it for
more information ==
Ing. Andrea Aime
@geowolf
Technical Lead
GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
mob: +39 339 8844549
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
------------------------------------------------------------------------------
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