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

AttributeParsers.MapParser leaves reader in inconsistent state when no wrapping element is present

XMLWordPrintable

      An XMLStreamReader component should always leave the reader in a predicable state.
      For every other AttributeParser implementation:
      Prior to calling AttributeParser.parseElement(...), XMLStreamReader.getEventType() == XMLStreamConstants.START_ELEMENT
      After calling AttributeParser.parseElement(...), XMLStreamReader.getEventType() == XMLStreamConstants.END_ELEMENT.

      AttributeParsers.MapParser complies with the above entry and exit criteria when configured with an element wrapper. However, when configured without an element wrapper, this method leave the reader in a different state: XMLStreamReader.getEventType() == XMLStreamConstants.START_ELEMENT.

      The parser introduced via WFCORE-6779 validates the above entry/exit criteria, and naturally fails when using AttributeParsers.MapParser without a wrapper element.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: