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

ExternalContext.encodeRedirectURL() fails if 'baseUrl' contains empty parameters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.3-SNAPSHOT
    • 2.0.3
    • General
    • None

    Description

      Calling ExternalContext.encodeRedirectURL() with a baseUrl containing empty parameters fails with an ArrayIndexOutOfBoundsException.

      Example:

      externalContext.encodeRedirectURL("/test?p1=&p2=test", null)

      The spec contains the following statement regarding this method: "This method must be able to encode the parameters to a baseUrl that may or may not have existing query parameters"

      I've attached a unit test and a patch for this issue.

      Attachments

        1. MYFACES-2954-test.patch
          1 kB
          Christian Kaltepoth
        2. MYFACES-2954-fix.patch
          1 kB
          Christian Kaltepoth

        Activity

          People

            jakobkorherr Jakob Korherr
            chkal Christian Kaltepoth
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: