[Geoserver-devel] [JIRA] (GEOS-8043) DataUtilities.collection( collection ) always returns DefaultFeatureCollection

Jody Garnett [Administrator] created an issue

GeoServer / BugGEOS-8043

DataUtilities.collection( collection ) always returns DefaultFeatureCollection

Issue Type:

BugBug

Assignee:

Unassigned

Created:

21/Mar/17 8:04 PM

Priority:

MediumMedium

Reporter:

Jody Garnett [Administrator]

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

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v1000.824.3#100035-sha1:74ec649)

Atlassian logo