Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-416

StringIndexOutOfBoundsException in AddResource

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1.0
    • 1.1.0
    • None
    • None

    Description

      The method writeWithFullHeader() in AddResource throws

      StringIndexOutOfBoundsException: String index out of range: -1

      on the line:

      writer.write(originalResponse.substring(insertPosition));

      The rest of the method contains checks for insertPosition to be >= 0, therefore the line should be changed to something like:

      writer.write(insertPosition > 0 ? originalResponse.substring(insertPosition) : originalResponse);

      Attachments

        Activity

          People

            Unassigned Unassigned
            pmahoney Peter Mahoney
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: