XStream
  1. XStream
  2. XSTR-174

moveDown() fails after getValue() with XppReader

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.2
    • Component/s: None
    • Labels:
      None

      Description

      getValue() seems to mess-up the lookahead queue.

      In a converter, when unmarshalling:

      ...
      reader.getValue();
      while (reader.hasMoreChildren()) {
      reader.moveDown();//this may fail there is no text
      context.convertAnother(...);
      reader.moveUp();
      }

      First lookahead() is called from getValue() but there is no text event. However, whatever event it was, it will be gone for the next lookahead() call (from hasMoreChildren()).

      Another way to see this is to call reader.getValue() multiple times.

        People

        • Assignee:
          Unassigned
          Reporter:
          Mihael Hategan
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: