[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:47:00 EDT 2016


     [ https://issues.jboss.org/browse/WFCORE-1644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry updated WFCORE-1644:
-------------------------------------
    Affects Version/s: 2.1.0.Final
                       2.0.0.Final


> 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: 2.0.0.Final, 2.1.0.Final, 2.2.0.CR5, 3.0.0.Alpha3
>            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