Details
Description
I'm using the MemoryDataStore in projects and a client application pushes Features with the FeatureWriter to the DataStore. A layer based on the FeatureType of the DataStore shows the features.
a ConcurrentModificationException is thrown within the StreamingRenderer while the applictaion is still writing features.
To simulate this effect a test-class is attached. And also a patch for the MemoryDataStore-class. I guess the org.geotools.gui.swing.map.map2d.stream.TempMemoryDataStore class was created to solve this problem, but it doesn't.
The patch should be rewritten using synchronization statements, or some flags in the store that decide what kind of backing store to use, and then alternatively create a synchronized linked hash map, or a concurrent hash map (with the first option as the default, to avoid breaking existing code)