[ https://issues.apache.org/jira/browse/ARIES-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14713577#comment-14713577 ]
John Ross commented on ARIES-1387: ---------------------------------- Note that you'll need to convert the parameter hash maps into linked hash maps in order to preserve the original orderings of attributes and directives. Implementing equals and hashCode on SubsystemManifest is certainly an option because it's immutable. However, although there are no spec'd order preservation requirements that I am aware of, I agree that the principal of least surprise dictates preservation absent a compelling reason. We should also note here the behavior when there are duplicates. Duplicate clauses, attributes, and directives will be removed with the last one in the original order remaining. > 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)