Replace indexOf() with a call to the contains()
See gh-15559
This commit is contained in:
committed by
Stephane Nicoll
parent
67eb3b748c
commit
b370b1f03a
@@ -130,7 +130,7 @@ final class JarURLConnection extends java.net.JarURLConnection {
|
||||
if (spec.endsWith(SEPARATOR)) {
|
||||
spec = spec.substring(0, spec.length() - SEPARATOR.length());
|
||||
}
|
||||
if (spec.indexOf(SEPARATOR) == -1) {
|
||||
if (!spec.contains(SEPARATOR)) {
|
||||
return new URL(spec);
|
||||
}
|
||||
return new URL("jar:" + spec);
|
||||
|
||||
Reference in New Issue
Block a user