Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-17233

'ListBasedXMLEventReader.getElementText()' doesn't work

    XMLWordPrintable

    Details

      Description

      The `StaxUtils.createXMLEventReader(events)` method returns the implementation of `XMLEventReader` which works incorrectly.
      The problem is in the `getElementText` method. It throws the `XMLStreamException` with the message 'Not at START_ELEMENT' even when the reader is at valid position with START_ELEMENT. In the javadoc of the `XMLEventReader` interface we can read: `Precondition: the current event is START_ELEMENT.`
      Current implementation uses method `peek()` to verify the current event, but the `peek` method return the next event not the current.

        Attachments

          Activity

            People

            Assignee:
            juergen.hoeller Juergen Hoeller
            Reporter:
            aholowko aholowko
            Last updater:
            Spring Issuemaster
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Days since last comment:
              1 year, 40 weeks, 6 days ago