ContentFeatureStore.getReader(Query) returns incorrect results when canTransact() returns false.

Description

A ContentFeatureStore subclass that does not return true from ContentFeatureSource.canTransact() - e.g. ShapeFileFeatureStore - will return invalid results from ContentFeatureStore.getReader(Query query). Specifically, if a transaction is open, all added and modified features will be returned by the iterator, even if they do not match the query.

 

In other words, while editing multiple features of a shapefile datastore within the same transaction (auto commit off) it was observed that during the commit action all affected attributes of modified features were set to the value of the last modified feature.

 

More detailed discussion of symptoms:
uDig issue 348

 

Environment

Windows 10. MacOS

Status

Assignee

Unassigned

Reporter

Adam Kater

Triage

None

Components

Fix versions

Affects versions

Priority

Medium
Configure