Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4
-
Tomcat 6.0.32, CXF 2.4, JDK 1.6.0_23
-
Novice
Description
URIMappingInterceptor keeps throwing ArrayIndexOutOfBounds error.
Method: getQueries
Statement (318): queries.put(keyValue[0], uriDecode(keyValue[1]));
Proposed Fix
Change from:
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; }
Change to:
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; }