ICU-11540 The previous fix broke the CoverageTest execution on Eclipse IDE (file: protocol). I reverted the change, and reverted #11521, and fixed the original issue in a different way.

X-SVN-Rev: 37051
This commit is contained in:
Yoshito Umaoka 2015-02-23 13:03:38 +00:00
parent 5596090680
commit df67b1a7d0
2 changed files with 6 additions and 15 deletions

View file

@ -199,9 +199,6 @@ public abstract class URLHandler {
if (ix >= 0) {
prefix = prefix.substring(ix + 2); // truncate after "!/"
}
if (!prefix.endsWith("/")) {
prefix += '/';
}
String protocol = url.getProtocol();
if (!protocol.equals("jar")) {
@ -235,19 +232,13 @@ public abstract class URLHandler {
if (name.startsWith(prefix)) {
name = name.substring(prefix.length());
int ix = name.lastIndexOf('/');
if (ix != -1) {
if (!recurse) {
continue;
}
if (strip) {
name = name.substring(ix+1);
}
if (ix > 0 && !recurse) {
continue;
}
if (strip && ix != -1) {
name = name.substring(ix+1);
}
v.visit(name);
}
}

View file

@ -137,7 +137,7 @@ public class CoverageTest extends CompatibilityTest implements URLHandler.URLVis
int ix = str.lastIndexOf(".class");
if (ix >= 0) {
String className = "com.ibm.icu." + str.substring(0, ix).replace('/', '.');
String className = "com.ibm.icu" + str.substring(0, ix).replace('/', '.');
// Skip things in com.ibm.icu.dev; they're not relevant.
if (className.startsWith("com.ibm.icu.dev.")) {