Replace contains() with indexOf()

Closes gh-11373
This commit is contained in:
Johnny Lim
2017-12-19 00:22:35 +09:00
committed by Stephane Nicoll
parent 544c40d46d
commit 4cc598ac5e
5 changed files with 10 additions and 9 deletions

View File

@@ -498,8 +498,8 @@ public class PropertiesLauncher extends Launcher {
// If home dir is same as parent archive, no need to add it twice.
return null;
}
if (root.contains("!")) {
int index = root.indexOf("!");
int index = root.indexOf("!");
if (index != -1) {
File file = new File(this.home, root.substring(0, index));
if (root.startsWith("jar:file:")) {
file = new File(root.substring("jar:file:".length(), index));