[jboss-jira] [JBoss JIRA] (WFCORE-1644) PersistenceResourceXmlDescription marshals attributes in the reverse order they are added

Brian Stansberry (JIRA) issues at jboss.org
Fri Jul 8 14:44:00 EDT 2016


Brian Stansberry created WFCORE-1644:
----------------------------------------

             Summary: PersistenceResourceXmlDescription marshals attributes in the reverse order they are added
                 Key: WFCORE-1644
                 URL: https://issues.jboss.org/browse/WFCORE-1644
             Project: WildFly Core
          Issue Type: Bug
          Components: Domain Management
    Affects Versions: 3.0.0.Alpha3, 2.2.0.CR5
            Reporter: Brian Stansberry
            Assignee: Brian Stansberry
             Fix For: 2.2.0.CR6, 3.0.0.Alpha4


This in marshalAttributes results in iterating over a reversed list:

{code}
//we sort attributes to make sure that attributes that marshall to elements are last
        for (AttributeDefinition ad : attributes.stream().sorted((o1, o2) -> o1.getParser().isParseAsElement() ? 1 : -1).collect(Collectors.toList())) {
        {code}

The sorter returning -1 for all non-element attributes has that effect.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the jboss-jira mailing list