Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-1644

PersistenceResourceXmlDescription marshals attributes in the reverse order they are added

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 2.2.0.CR6, 3.0.0.Alpha4
    • 2.0.0.Final, 2.1.0.Final, 2.2.0.CR5, 3.0.0.Alpha3
    • Management
    • None

    Description

      This in marshalAttributes results in iterating over a reversed list:

      //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())) {
              

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

      Attachments

        Activity

          People

            bstansbe@redhat.com Brian Stansberry
            bstansbe@redhat.com Brian Stansberry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: