Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-05-21 15:53:41 +0000
committerAlexander Kurtakov2019-06-10 16:45:00 +0000
commitfff24aab1c4598e4e9c20c35093ef1a27e546aa5 (patch)
tree8acb2a17df4aa8504f7f938edb9adbd0ff51b114 /bundles/org.eclipse.equinox.p2.testserver
parenta0f5386e6c545e3a51c4daefc9b14c25f576d961 (diff)
downloadrt.equinox.p2-fff24aab1c4598e4e9c20c35093ef1a27e546aa5.tar.gz
rt.equinox.p2-fff24aab1c4598e4e9c20c35093ef1a27e546aa5.tar.xz
rt.equinox.p2-fff24aab1c4598e4e9c20c35093ef1a27e546aa5.zip
Replace usage of String.indexOf with String.contains where possible
Change-Id: I5cf1901c5b80a13bb09be0b73966c4709b954a59 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.testserver')
-rw-r--r--bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
index 9f36b0af9..fe1c353af 100644
--- a/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
+++ b/bundles/org.eclipse.equinox.p2.testserver/src/org/eclipse/equinox/p2/testserver/SecuredArtifactsContext.java
@@ -35,9 +35,11 @@ public class SecuredArtifactsContext extends SecureContext {
if (path == null)
return true;
- if (path.indexOf("features/") != -1 //$NON-NLS-1$
- || path.indexOf("plugins/") != -1 //$NON-NLS-1$
- || path.indexOf("binaries/") != -1) //$NON-NLS-1$
+ if (path.contains("features/") //$NON-NLS-1$
+
+ || path.contains("plugins/") //$NON-NLS-1$
+
+ || path.contains("binaries/")) //$NON-NLS-1$
return super.handleSecurity(request, response);
return true;

Back to the top