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.