| Summary: | [localdiscovery] StringIndexOutOfBoundsException when Remote-Service path is at root of bundle | ||
|---|---|---|---|
| Product: | [RT] ECF | Reporter: | Neil Bartlett <njbartlett> |
| Component: | ecf.remoteservices | Assignee: | Scott Lewis <slewis> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | slewis |
| Version: | 3.3.0 | ||
| Target Milestone: | 3.4.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Neil Bartlett
Fix released to HEAD.
Fix was to replace this code:
String path = token.substring(0, token.lastIndexOf("/"));
with this
int lastSlash = token.lastIndexOf("/");
String path = (lastSlash <= 0)?"/":token.substring(0,lastSlash);
This assures that if the there is no slash at all, or the slash is in the first position, the intention is to assume the file is at the bundle root ("/")
Resolving as fixed. Thanks Neil for the report.
|