URIMappingInterceptor and ArrayIndexOutOfBounds Error
-----------------------------------------------------
Key: CXF-3480
URL: https://issues.apache.org/jira/browse/CXF-3480
Project: CXF
Issue Type: Bug
Components: Core
Affects Versions: 2.4
Environment: Tomcat 6.0.32, CXF 2.4, JDK 1.6.0_23
Reporter: Ron Grimes
Priority: Minor
URIMappingInterceptor keeps throwing ArrayIndexOutOfBounds error.
Method: getQueries
Statement (318): queries.put(keyValue[0], uriDecode(keyValue[1]));
Proposed Fix
Change from:
{code}
if (!StringUtils.isEmpty(query)) {
List<String> parts = Arrays.asList(query.split("&"));
for (String part : parts) {
String[] keyValue = part.split("=");
queries.put(keyValue[0], uriDecode(keyValue[1]));
}
return queries;
}
{code}
Change to:
{code}
if (!StringUtils.isEmpty(query)) {
List<String> parts = Arrays.asList(query.split("&"));
for (String part : parts) {
if (part.contains("=")) {
String[] keyValue = part.split("=");
queries.put(keyValue[0], uriDecode(keyValue[1]));
}
}
return queries;
}
{code}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira