aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Ross (JIRA)" <>
Subject [jira] [Commented] (ARIES-1387) Make Subsystem header items order reproducible
Date Thu, 27 Aug 2015 12:18:46 GMT


John Ross commented on ARIES-1387:

Sorry for being wishy-washy about this, but I just can't get a nagging feeling out of my mind.
I guess I'm just nervous about introducing new and perhaps unnecessary restrictions on the
implementation. The opposing argument in my mind runs as follows.

(1) The specification does not impose an ordering on clauses, attributes, or directives.
(2) The most important thing is that an equivalent, not necessarily a string equals, value
is returned such that the end result of processing the constituent parts of the string would
be the same. This satisfies the requirement of always getting back the same results given
the same parameters, but perhaps from a different perspective.

I'm not saying I object to the current approach. I just want to be sure the alternatives are
considered. Is it possible that the equals/hashCode approach would be the better solution
here considering it would seem to satisfy your requirements without introducing an ordering
guarantee that currently does not exist? 

> Make Subsystem header items order reproducible
> ----------------------------------------------
>                 Key: ARIES-1387
>                 URL:
>             Project: Aries
>          Issue Type: Improvement
>          Components: Subsystem
>            Reporter: Cristiano GaviĆ£o
> Currently the org.apache.aries.subsystem.core.archive.SubsystemContentHeader class (line
210) and other headers classes uses a HashSet in order to hold its clauses.
> HashSet doesn't ensure the order of its items and then its impossible to have a reproducible
build of any manifest file. As the SubsystemManifest class doesn't provide a equals() method,
we can't compare a generated manifest file with any template in a test, it will fail.
> The propose it to change the used HashSet for the LinkedHashSet class.

This message was sent by Atlassian JIRA

View raw message