sjsxp
  1. sjsxp
  2. SJSXP-57

XMLEventReaderImpl.getElementText() and nextTag() fail to update last event

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      57

      Description

      The getElementText() and nextTag() methods of XMLEventReaderImpl advance the
      position in the stream but do not update fLastEvent if there was no peeked event.

      As such, a call of the form:

      [1] peek()
      [2] getElementText()
      [3] nextTag()
      [4] getElementText()

      will fail with the exception "parser must be on START_ELEMENT to read next text"
      because the fLastEvent was left pointing to an END_ELEMENT in [2] above and not
      updated in [3].

        Activity

        Hide
        Joe Wang added a comment -

        assigned to me.

        Show
        Joe Wang added a comment - assigned to me.
        Hide
        Joe Wang added a comment -

        As indicated in the bug report, the nextTag method, and getElementText when
        there's no peek event, failed to update the last event. This is now fixed in
        sjsxp. I will port the patch into jaxp and suggest for a future jdk6 update
        release.

        I've lowered the priority to p3 since this is a primary functionality but has
        limited impact.

        Thanks for reporting the bug!

        Show
        Joe Wang added a comment - As indicated in the bug report, the nextTag method, and getElementText when there's no peek event, failed to update the last event. This is now fixed in sjsxp. I will port the patch into jaxp and suggest for a future jdk6 update release. I've lowered the priority to p3 since this is a primary functionality but has limited impact. Thanks for reporting the bug!

          People

          • Assignee:
            Joe Wang
            Reporter:
            dcitron
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: