| This has caused problems in
GEOS-8042 Open where a list has been passed in as the collection, and the results were sorted into a treeset which was not what was expected. We have some additional FeatureCollection implementations to choose from - but prefer developers call them directly rather than rely on the DataUtilities facade. Sadly that has not worked, as although documented, developers have not discovered these implementations. Alternatives to consider:
- Deprecate DataUtilities.collection( collection ), and ask more strongly for developers to use the FeatureCollection implementation of their choice
- Replace DataUtilities.collection(collection) with DataUtilities.collection(list) and DataUtilities.collection( set ) so we can have an explicit javadoc.
We are stuck here between:
- violating the principle of least surprise (as shown by
GEOS-8042 Open above)
- preserving backwards compatibility
|