Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-7141826

Discrepancy between the methods hasNext() and next() in XMLEventReader

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 7u6
    • 7u4
    • xml

      During testing we found the case where the method next () and hasNext () do not corresponded to each other. Method hasNext() returns true, but the method of next() throws NoSuchElementException.
      May be xml file is wrong because of the line separator is \r\n , but in any case, the behavior of these methods must match. In the case of a file with the correct line separator(\n) it works properly.

            joehw Joe Wang
            psemenov Pavel Semenov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: