Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1275

java.lang.ArrayIndexOutOfBoundsException at org.apache.xerces.impl.XMLEntityScanner.skipSpaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 2.7.1, 2.9.1
    • None
    • None
    • None

    Description

      Under some rare circumstances you get an ArrayIndexOutOfBoundsException in Xerces. This is the case if the Reader you give with the SaxParser.parse-Method returns 0 for the method public int read(char[] cbuf, int off, int len)
      This can lead to that exception.
      Apparently Xerces reads in the XML in chunks of 2048 bytes. If the last read(..) call returns 2048 filled bytes, and the following read returns 0 (although it should return -1) this exception occurs. You should prevent this by accepting 0 as valid return of read, although it does not indicate, that the end of file has been reached.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwindszus Konrad Windszus (inactive account)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: