You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by "Martin Desruisseaux (JIRA)" <ji...@apache.org> on 2013/07/01 13:40:20 UTC
[jira] [Resolved] (SIS-90) Metadata objects should use EnumSet and
CodeListSet when appropriate
[ https://issues.apache.org/jira/browse/SIS-90?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Desruisseaux resolved SIS-90.
------------------------------------
Resolution: Fixed
Fix Version/s: (was: 0.4)
0.3
Fixed on 0.3, except for the hole in the "unmodifiable" state which is documented in a separated JIRA task (SIS-107).
> Metadata objects should use EnumSet and CodeListSet when appropriate
> --------------------------------------------------------------------
>
> Key: SIS-90
> URL: https://issues.apache.org/jira/browse/SIS-90
> Project: Spatial Information Systems
> Issue Type: Improvement
> Components: Metadata
> Reporter: Martin Desruisseaux
> Priority: Minor
> Fix For: 0.3
>
>
> {{ModifiableMetadata}} selects the appropriate collection type for a given element type by invoking the protected {{collectionType(Class)}} method. Current implementation returns only {{List.class}} or {{Set.class}}. Consequently {{HashSet}} is used for all {{Enum}} and {{CodeList}} collections.
> The {{EnumSet}} and {{CodeListSet}} are more efficient (more compact and presumed faster) implementations of {{Set}} for enumerations and code lists, so they should be used. Note that since {{EnumSet}} is mutable, we will need to clone it before to return such set from a unmodifiable metadata.
> We could also move {{collectionType(Class)}} method from {{ModifiableMetadata}} to {{StandardMetadata}} instead, in order to control the collection type policy in a single place instead than for each metadata object.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira