| Summary: | [remoteserviceadmin] EndpointDescriptionParser.processValue does not handle whitespace correctly | ||
|---|---|---|---|
| Product: | [RT] ECF | Reporter: | Scott Lewis <slewis> |
| Component: | ecf.remoteservices | Assignee: | Scott Lewis <slewis> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 3.4.0 | ||
| Target Milestone: | 3.5.0 | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
Fix released to master. |
In EndpointDescriptionParser.processValue is this code: private String processValue(String characters) { if (characters == null || characters.length() == 0) return null; if (valueType.equals("String")) //$NON-NLS-1$ return characters; int startIndex = 0; while (Character.isWhitespace(characters.charAt(startIndex))) startIndex++; int endIndex = characters.length() - 1; while (Character.isWhitespace(characters.charAt(endIndex))) endIndex--; return characters.substring(startIndex, endIndex + 1); } This code will fail with an ArrayIndexOutOfBounds exception if the characters is " " (a single space).