aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cristiano Gavião (JIRA) <j...@apache.org>
Subject [jira] [Comment Edited] (ARIES-1387) Make Subsystem header items order reproducible
Date Thu, 27 Aug 2015 17:48:47 GMT

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

Cristiano Gavião edited comment on ARIES-1387 at 8/27/15 5:48 PM:
------------------------------------------------------------------

it ok... :) you are bit right.

before I entered to string comparison approach my first thought was to implement equals()
and hashCode(). 

I started to play with it one day but I got lazy and gave up because do not exist one abstract
parent Clause class, but almost every Header class holds its own Clause implementing interface
org.apache.aries.subsystem.core.archive.Clause. And, not all Header, Attribute or Directive
classes extends its respective existent abstracts ones. 

so, I choose the fastest path... :)


was (Author: cvgaviao):
it ok... :) you are bit right.

before I entered to string comparison approach my first thought was to implement equals()
and hashCode(). 

I started to play with a day but I got lazy and gave up because do not exist one abstract
parent Clause class, but almost every Header class holds its own Clause implementing interface
org.apache.aries.subsystem.core.archive.Clause. And, not all Header, Attribute or Directive
classes extends its respective existent abstracts ones. 

so, I choose the fastest path... :)

> 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)

Mime
View raw message