summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm
diff options
context:
space:
mode:
authorCarsten Hammer <carsten.hammer@t-online.de>2019-04-06 19:06:58 +0200
committerDavid Pursehouse <david.pursehouse@gmail.com>2019-04-11 11:45:11 +0900
commitbf251ea0e844c1269256845ac032a44a49a9e88a (patch)
tree7c3f50bff88eafdbaed37f0a83f62f82fa0ce196 /org.eclipse.jgit.pgm
parentdff4f6cc74d54e28252d9c83cc486bf1c8e26d5b (diff)
downloadjgit-bf251ea0e844c1269256845ac032a44a49a9e88a.tar.gz
jgit-bf251ea0e844c1269256845ac032a44a49a9e88a.zip
Replace usage of String.indexOf with String.contains where possible
Change-Id: Iad3fce891077d85cf2533272c54206c33c37afd8 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index ad10ec9e44..c7e4bad94e 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -395,7 +395,7 @@ public class Main {
}
final URL u = new URL(
- (s.indexOf("://") == -1) ? protocol + "://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
+ (!s.contains("://")) ? protocol + "://" + s : s); //$NON-NLS-1$ //$NON-NLS-2$
if (!u.getProtocol().startsWith("http")) //$NON-NLS-1$
throw new MalformedURLException(MessageFormat.format(
CLIText.get().invalidHttpProxyOnlyHttpSupported, s));