You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@aries.apache.org by "Cristiano Gavião (JIRA)" <ji...@apache.org> on 2015/08/26 16:02:46 UTC

[jira] [Comment Edited] (ARIES-1387) Make Subsystem header items order reproducible

    [ https://issues.apache.org/jira/browse/ARIES-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14713466#comment-14713466 ] 

Cristiano Gavião edited comment on ARIES-1387 at 8/26/15 2:02 PM:
------------------------------------------------------------------

Hi,

I did this change locally and it is working well for now in unit tests that I've created for the maven plugin that I'm working with. I substituted every HashSet for LinkedHashSet. 
So if the attributes and directives are being added in the right order it won't be a problem.
 
My concerning was about the grammar related classes to generate the same result every time they are called with the same parameters, this way it is possible to assert the result against a template.

I will do some more test before to do a pull request.


was (Author: cvgaviao):
Hi,

I did this change locally and it is working well for now in unit tests that I've created for the maven plugin that I'm working with. I substituted every HashSet for LinkedHashSet, so the attributes and directives are being added in the right order it won't be a problem.
 
My concerning was about the grammar related classes to generate the same result every time they are called with the same parameters, this way it is possible to assert the result against a template.

I will do some more test before to do a pull request.

> Make Subsystem header items order reproducible
> ----------------------------------------------
>
>                 Key: ARIES-1387
>                 URL: https://issues.apache.org/jira/browse/ARIES-1387
>             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
(v6.3.4#6332)