Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-05-24 13:32:24 -0400
committerKarsten Thoms2019-06-11 23:26:16 -0400
commita4971de42d587d28f03a83345ae7b9e677d9fcb2 (patch)
tree9cb51a56be0bd2d51d7839cd8477f7a7a500d7e5
parent907f7c8640f453f62f1d7b4d74ace55e0d389419 (diff)
downloadeclipse.platform.team-a4971de42d587d28f03a83345ae7b9e677d9fcb2.tar.gz
eclipse.platform.team-a4971de42d587d28f03a83345ae7b9e677d9fcb2.tar.xz
eclipse.platform.team-a4971de42d587d28f03a83345ae7b9e677d9fcb2.zip
Change-Id: I6ec0fd3fa12538157a4ce6a1008424229cf4cc24 Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--bundles/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java2
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java4
-rw-r--r--bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java2
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java4
-rw-r--r--bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java4
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java2
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java28
-rw-r--r--bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java4
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java8
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java2
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java4
-rw-r--r--examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java2
-rw-r--r--tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF2
-rw-r--r--tests/org.eclipse.core.tests.net/pom.xml2
-rw-r--r--tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java3
26 files changed, 49 insertions, 50 deletions
diff --git a/bundles/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java b/bundles/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java
index 7a109e39f..9fd5fba76 100644
--- a/bundles/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java
+++ b/bundles/org.eclipse.compare.win32/src/org/eclipse/compare/internal/win32/WordMergeViewer.java
@@ -159,7 +159,7 @@ public class WordMergeViewer extends AbstractMergeViewer implements IFlushable,
String dPath;
String ePath;
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
+ if (relPath.contains("/")) { //$NON-NLS-1$
String path= relPath.substring(1);
dPath= 'd' + path;
ePath= 'e' + path;
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
index 3d856f9f0..d1a76be5b 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/EditionSelectionDialog.java
@@ -637,11 +637,11 @@ public class EditionSelectionDialog extends ResizableDialog {
}
private boolean hasDoubleQuotes(String string) {
- return string.indexOf("''") != -1; //$NON-NLS-1$
+ return string.contains("''"); //$NON-NLS-1$
}
private boolean hasVariable(String string) {
- return string.indexOf("{0}") != -1; //$NON-NLS-1$
+ return string.contains("{0}"); //$NON-NLS-1$
}
/**
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
index 815798502..16dce1327 100644
--- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
+++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/Utilities.java
@@ -294,7 +294,7 @@ public class Utilities {
String dPath;
String ePath;
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
+ if (relPath.contains("/")) { //$NON-NLS-1$
String path= relPath.substring(1);
dPath= 'd' + path;
ePath= 'e' + path;
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java
index e11e80697..00dbc5dfc 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyBypass.java
@@ -82,7 +82,7 @@ public class ProxyBypass {
* @return
*/
private static boolean isLocal(String host) {
- return host.indexOf(".") == -1; //$NON-NLS-1$
+ return !host.contains("."); //$NON-NLS-1$
}
/**
@@ -90,7 +90,7 @@ public class ProxyBypass {
* @return
*/
private static boolean isBypassLocalAddresses(String proxyBypass) {
- return proxyBypass.indexOf(BYPASS_LOCAL_ADDESSES_TOKEN) != -1;
+ return proxyBypass.contains(BYPASS_LOCAL_ADDESSES_TOKEN);
}
public String[] getNonProxiedHosts() {
diff --git a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java
index 3d7144b37..b53ac4eaa 100644
--- a/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java
+++ b/bundles/org.eclipse.core.net/src/org/eclipse/core/internal/net/proxy/win32/winhttp/ProxyProviderUtil.java
@@ -89,7 +89,7 @@ public final class ProxyProviderUtil {
// The scheme of the uri is irrelevant. We add the http://
// scheme to enable class URI to parse the stuff
String augmentedURI = proxyDefinition.substring(urlStart);
- if (augmentedURI.indexOf("://") == -1) //$NON-NLS-1$
+ if (!augmentedURI.contains("://")) //$NON-NLS-1$
augmentedURI = "http://" + augmentedURI; //$NON-NLS-1$
URI uri = new URI(augmentedURI);
host = uri.getHost();
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
index d2917d4f0..19dbdbba7 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Add.java
@@ -85,9 +85,9 @@ public class Add extends Command {
String serverMessage = getServerMessage(line, location);
if (serverMessage != null) {
- if (serverMessage.indexOf("cvs commit") != -1 && serverMessage.indexOf("add") != -1 && serverMessage.indexOf("permanently") != -1) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ if (serverMessage.contains("cvs commit") && serverMessage.contains("add") && serverMessage.contains("permanently")) //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return OK;
- if (serverMessage.startsWith("scheduling file") && serverMessage.indexOf("for addition") != -1) //$NON-NLS-1$ //$NON-NLS-2$
+ if (serverMessage.startsWith("scheduling file") && serverMessage.contains("for addition")) //$NON-NLS-1$ //$NON-NLS-2$
return OK;
}
return super.errorLine(line, location, commandRoot, monitor);
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
index 1e5ed8649..c37beec4b 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/ImportStructureVisitor.java
@@ -83,7 +83,7 @@ class ImportStructureVisitor implements ICVSResourceVisitor {
for (int i = 0; i < wrappers.length; i++) {
- if (wrappers[i].indexOf(KEYWORD_OPTION) == -1) {
+ if (!wrappers[i].contains(KEYWORD_OPTION)) {
continue;
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
index aa9742db2..9840e92ce 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/Session.java
@@ -236,7 +236,7 @@ public class Session {
*/
public boolean isValidRequest(String request) {
return (validRequests == null) ||
- (validRequests.indexOf(" " + request + " ") != -1); //$NON-NLS-1$ //$NON-NLS-2$
+ (validRequests.contains(" " + request + " ")); //$NON-NLS-1$ //$NON-NLS-2$
}
public boolean isCVSNT() {
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
index 0b96cd76e..dbd9e7421 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/UpdatedHandler.java
@@ -88,8 +88,8 @@ public class UpdatedHandler extends ResponseHandler {
ICVSFile mFile = getTargetFile(mParent, fileName, entryBytes);
boolean binary = ResourceSyncInfo.isBinary(entryBytes);
- boolean readOnly = permissionsLine.indexOf(READ_ONLY_FLAG) == -1;
- boolean executable = permissionsLine.indexOf(EXECUTE_FLAG) != -1;
+ boolean readOnly = !permissionsLine.contains(READ_ONLY_FLAG);
+ boolean executable = permissionsLine.contains(EXECUTE_FLAG);
try {
// The file may have been set as read-only by a previous checkout/update
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
index 0660b6dc2..3050ab631 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/client/listeners/DiffListener.java
@@ -84,7 +84,7 @@ public class DiffListener extends CommandOutputListener {
}
//Check to see if this is a no such directory message
- if (line.indexOf(ERR_NOSUCHDIRECTORY) != -1){
+ if (line.contains(ERR_NOSUCHDIRECTORY)){
return OK;
}
return super.errorLine(line, location, commandRoot, monitor);
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
index f7c0c4288..4aedbda4d 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/connection/PServerConnection.java
@@ -234,7 +234,7 @@ public class PServerConnection implements IServerConnection {
message += separator + line.substring(ERROR_MESSAGE.length() + 1);
else
message += separator + line;
- if (message.indexOf(NO_SUCH_USER) != -1)
+ if (message.contains(NO_SUCH_USER))
throw new CVSAuthenticationException(NLS.bind(CVSMessages.PServerConnection_invalidUser, (new Object[] {message})), CVSAuthenticationException.RETRY,cvsroot);
throw new IOException(NLS.bind(CVSMessages.PServerConnection_connectionRefused, (new Object[] { message })));
}
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
index 8b5770dc4..73d7d66c8 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteFolder.java
@@ -325,7 +325,7 @@ public class RemoteFolder extends RemoteResource implements ICVSRemoteFolder, IC
public ICVSResource getChild(String path) throws CVSException {
if (path.equals(Session.CURRENT_LOCAL_FOLDER) || path.length() == 0)
return this;
- if (path.indexOf(Session.SERVER_SEPARATOR) != -1) {
+ if (path.contains(Session.SERVER_SEPARATOR)) {
IPath p = new Path(null, path);
try {
return ((RemoteFolder)getChild(p.segment(0))).getChild(p.removeFirstSegments(1).toString());
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
index 09935efe9..21b39973e 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/resources/RemoteModule.java
@@ -357,7 +357,7 @@ public class RemoteModule extends RemoteFolder {
// path and re-invoke this method so we only need to check for one segment here
// and use the inherited method in the other cases
if (referencedModules != null) {
- if (path.indexOf(Session.SERVER_SEPARATOR) == -1) {
+ if (!path.contains(Session.SERVER_SEPARATOR)) {
for (int i=0;i<referencedModules.length;i++) {
if (referencedModules[i].getName().equals(path))
return referencedModules[i];
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
index 1b60a8c81..14f23c3ce 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/syncinfo/ResourceSyncInfo.java
@@ -412,19 +412,19 @@ public class ResourceSyncInfo {
// having outgoing changes.
// The purpose for having the two different timestamp options for merges is to
// dissallow commit of files that have conflicts until they have been manually edited.
- if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
+ if(date.contains(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED)) {
syncType = TYPE_MERGED;
date = null;
- } else if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
+ } else if(date.contains(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT)) {
syncType = TYPE_MERGED_WITH_CONFLICTS;
date = null;
- } else if(date.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
+ } else if(date.contains(TIMESTAMP_MERGED_WITH_CONFLICT)) {
date = date.substring(date.indexOf("+") + 1); //$NON-NLS-1$
syncType = TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED)!=-1) {
+ } else if(date.contains(TIMESTAMP_MERGED)) {
syncType = TYPE_MERGED;
date = null;
- } else if (date.indexOf(TIMESTAMP_DELETED_AND_RESTORED) != -1) {
+ } else if (date.contains(TIMESTAMP_DELETED_AND_RESTORED)) {
syncType = TYPE_DELETED_AND_RESTORED;
date = date.substring(date.indexOf("+") + 1); //$NON-NLS-1$
}
@@ -777,13 +777,13 @@ public class ResourceSyncInfo {
*/
private static Date getTimestamp(String syncTimestamp) {
String dateString= syncTimestamp;
- if(syncTimestamp.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
+ if(syncTimestamp.contains(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED)) {
dateString = null;
- } else if(syncTimestamp.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
+ } else if(syncTimestamp.contains(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT)) {
dateString = null;
- } else if(syncTimestamp.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
+ } else if(syncTimestamp.contains(TIMESTAMP_MERGED_WITH_CONFLICT)) {
dateString = syncTimestamp.substring(syncTimestamp.indexOf("+") + 1); //$NON-NLS-1$
- } else if(syncTimestamp.indexOf(TIMESTAMP_MERGED)!=-1) {
+ } else if(syncTimestamp.contains(TIMESTAMP_MERGED)) {
dateString = null;
}
@@ -806,15 +806,15 @@ public class ResourceSyncInfo {
* @return int
*/
private static int getSyncType(String date) {
- if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED) != -1) {
+ if(date.contains(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED)) {
return TYPE_MERGED;
- } else if(date.indexOf(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT) != -1) {
+ } else if(date.contains(ResourceSyncInfo.TIMESTAMP_SERVER_MERGED_WITH_CONFLICT)) {
return TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED_WITH_CONFLICT)!=-1) {
+ } else if(date.contains(TIMESTAMP_MERGED_WITH_CONFLICT)) {
return TYPE_MERGED_WITH_CONFLICTS;
- } else if(date.indexOf(TIMESTAMP_MERGED)!=-1) {
+ } else if(date.contains(TIMESTAMP_MERGED)) {
return TYPE_MERGED;
- } else if (date.indexOf(TIMESTAMP_DELETED_AND_RESTORED) != -1) {
+ } else if (date.contains(TIMESTAMP_DELETED_AND_RESTORED)) {
return TYPE_DELETED_AND_RESTORED;
}
return TYPE_REGULAR;
diff --git a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
index 57a91461a..729ed06b5 100644
--- a/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
+++ b/bundles/org.eclipse.team.cvs.core/src/org/eclipse/team/internal/ccvs/core/util/CVSDateFormatter.java
@@ -84,10 +84,10 @@ public class CVSDateFormatter {
return TimeZone.getTimeZone("GMT");//$NON-NLS-1$
String tz = null;
StringBuilder resultTz = new StringBuilder("GMT");//$NON-NLS-1$
- if (dateFromServer.indexOf("-") != -1) {//$NON-NLS-1$
+ if (dateFromServer.contains("-")) {//$NON-NLS-1$
resultTz.append("-");//$NON-NLS-1$
tz = dateFromServer.substring(dateFromServer.indexOf("-"));//$NON-NLS-1$
- } else if (dateFromServer.indexOf("+") != -1) {//$NON-NLS-1$
+ } else if (dateFromServer.contains("+")) {//$NON-NLS-1$
resultTz.append('+');
tz = dateFromServer.substring(dateFromServer.indexOf("+"));//$NON-NLS-1$
}
diff --git a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
index 567f45514..81d352364 100644
--- a/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
+++ b/bundles/org.eclipse.team.cvs.ssh2/src/org/eclipse/team/internal/ccvs/ssh2/CVSSSH2ServerConnection.java
@@ -195,10 +195,10 @@ public class CVSSSH2ServerConnection implements IServerConnection {
int end = message.indexOf(": ", start); //$NON-NLS-1$
if (end != -1) {
String exception = message.substring(start, end).trim();
- if (exception.indexOf("NoRouteToHostException") != -1) { //$NON-NLS-1$
+ if (exception.contains("NoRouteToHostException")) { //$NON-NLS-1$
message = NLS.bind(CVSSSH2Messages.CVSSSH2ServerConnection_1, new String[] { location.getHost() });
throw new NoRouteToHostException(message);
- } else if (exception.indexOf("java.net.UnknownHostException") != -1) { //$NON-NLS-1$
+ } else if (exception.contains("java.net.UnknownHostException")) { //$NON-NLS-1$
throw new UnknownHostException(location.getHost());
} else {
message = message.substring(end + 1).trim();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
index 647d18e14..3be7ef5d8 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/AlternateUserValidationDialog.java
@@ -188,7 +188,7 @@ public class AlternateUserValidationDialog extends Dialog {
fd.setStyle(SWT.BOLD);
fd.setHeight(10);
// On Windows, set the font to Sans Serif for an authentic look
- if (System.getProperty("os.name").indexOf("Windows") != -1) { //$NON-NLS-1$ //$NON-NLS-2$
+ if (System.getProperty("os.name").contains("Windows")) { //$NON-NLS-1$ //$NON-NLS-2$
fd.setName("Microsoft Sans Serif"); //$NON-NLS-1$
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java
index 424fb6988..b42ad4343 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/CVSHistorySearchFilter.java
@@ -71,7 +71,7 @@ public class CVSHistorySearchFilter extends org.eclipse.jface.viewers.ViewerFilt
if (comment != null) {
Iterator iter = searchStrings.iterator();
while (iter.hasNext()) {
- if (!(comment.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ if (!!comment.contains(((String) iter.next()).toLowerCase()))
return true;
}
}
@@ -96,7 +96,7 @@ public class CVSHistorySearchFilter extends org.eclipse.jface.viewers.ViewerFilt
String tag = branches[i].getName().toLowerCase();
Iterator iter = searchStrings.iterator();
while (iter.hasNext()) {
- if (!(tag.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ if (!!tag.contains(((String) iter.next()).toLowerCase()))
return true;
}
}
@@ -110,7 +110,7 @@ public class CVSHistorySearchFilter extends org.eclipse.jface.viewers.ViewerFilt
String tag = tags[i].getName().toLowerCase();
Iterator iter = searchStrings.iterator();
while (iter.hasNext()) {
- if (!(tag.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ if (!!tag.contains(((String) iter.next()).toLowerCase()))
return true;
}
}
@@ -123,7 +123,7 @@ public class CVSHistorySearchFilter extends org.eclipse.jface.viewers.ViewerFilt
if (rev != null) {
Iterator iter = searchStrings.iterator();
while (iter.hasNext()) {
- if (!(rev.indexOf(((String) iter.next()).toLowerCase()) == -1))
+ if (!!rev.contains(((String) iter.next()).toLowerCase()))
return true;
}
}
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
index 1a103cac8..72d65b803 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/wizards/ConfigurationWizardMainPage.java
@@ -623,7 +623,7 @@ public class ConfigurationWizardMainPage extends CVSWizardPage {
}
}
// look for // and inform the user that we support use of C:\cvs\root instead of /c//cvs/root
- if (pathString.indexOf("//") != -1) { //$NON-NLS-1$
+ if (pathString.contains("//")) { //$NON-NLS-1$
if (pathString.indexOf("//") == 2) { //$NON-NLS-1$
// The user is probably trying to specify a CVSNT path
return new Status(IStatus.ERROR, CVSUIPlugin.ID, INVALID_FIELD_CONTENTS,
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
index 6a900158d..a3b8755b5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/Utils.java
@@ -573,7 +573,7 @@ public class Utils {
if (relPath != null && !relPath.equals(imageKey) && relPath.trim().length() > 0) {
String dPath;
String ePath;
- if (relPath.indexOf("/") >= 0) { //$NON-NLS-1$
+ if (relPath.contains("/")) { //$NON-NLS-1$
String path = relPath.substring(1);
dPath = 'd' + path;
ePath = 'e' + path;
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
index 9526b2d7e..343609adb 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/registry/TeamDecoratorDescription.java
@@ -58,10 +58,10 @@ public class TeamDecoratorDescription {
if (flags == null) {
decoratedDirection = IThreeWayDiff.INCOMING | IThreeWayDiff.OUTGOING;
} else {
- if (flags.indexOf(INCOMING_FLAG) != -1) {
+ if (flags.contains(INCOMING_FLAG)) {
decoratedDirection |= IThreeWayDiff.INCOMING;
}
- if (flags.indexOf(OUTGOING_FLAG) != -1) {
+ if (flags.contains(OUTGOING_FLAG)) {
decoratedDirection |= IThreeWayDiff.OUTGOING;
}
if (decoratedDirection == 0) {
diff --git a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
index a11a2f48f..d862fe89c 100644
--- a/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
+++ b/examples/org.eclipse.compare.examples.xml/src/org/eclipse/compare/examples/xml/XMLCompareAddIdMapDialog.java
@@ -116,7 +116,7 @@ public class XMLCompareAddIdMapDialog extends StatusDialog {
status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_idmapExists);
newText= fIdMapExtText.getText().toLowerCase();
if (newText.length() > 0) {
- if (newText.indexOf(".") > -1) //$NON-NLS-1$
+ if (newText.contains(".")) //$NON-NLS-1$
status.setError(XMLCompareMessages.XMLCompareAddIdMapDialog_error_extfullstop);
else if (fIdExtensionToName.containsKey(newText) && !fIdExtensionToName.get(newText).equals(fIdMap.getName()))
status.setError(MessageFormat.format("{0} {1}", XMLCompareMessages.XMLCompareAddIdMapDialog_error_extExists,fIdExtensionToName.get(newText))); //$NON-NLS-1$
diff --git a/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF b/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF
index 81a8f7c5e..5e8222883 100644
--- a/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF
+++ b/tests/org.eclipse.core.tests.net/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Net Tests Plug-in
Bundle-SymbolicName: org.eclipse.core.tests.net
-Bundle-Version: 1.4.300.qualifier
+Bundle-Version: 1.4.400.qualifier
Bundle-Activator: org.eclipse.core.tests.net.Activator
Bundle-Vendor: Eclipse.org
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
diff --git a/tests/org.eclipse.core.tests.net/pom.xml b/tests/org.eclipse.core.tests.net/pom.xml
index 24ceede52..050926337 100644
--- a/tests/org.eclipse.core.tests.net/pom.xml
+++ b/tests/org.eclipse.core.tests.net/pom.xml
@@ -18,7 +18,7 @@
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.tests.net</artifactId>
- <version>1.4.300-SNAPSHOT</version>
+ <version>1.4.400-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
diff --git a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java b/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java
index cb52bda07..54d39cc7c 100644
--- a/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java
+++ b/tests/org.eclipse.core.tests.net/src/org/eclipse/core/tests/net/NetTest.java
@@ -454,7 +454,7 @@ public class NetTest {
String sysPropNonProxyHosts = System.getProperty("http.nonProxyHosts");
String assertMessage = "http.nonProxyHost should contain '" + testHost + "', but its current value is '"
+ sysPropNonProxyHosts + "'";
- assertTrue(assertMessage, sysPropNonProxyHosts.indexOf(testHost) > -1);
+ assertTrue(assertMessage, sysPropNonProxyHosts.contains(testHost));
this.getProxyManager().setNonProxiedHosts(oldHosts);
}
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
index 6194cc4b6..b714c1b2a 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/core/mappings/ResourceMapperTests.java
@@ -466,8 +466,7 @@ public class ResourceMapperTests extends EclipseTest {
if (e instanceof InterruptedIOException
&& e.getMessage() != null
- && e.getMessage().indexOf(
- "Timeout while writing to output stream") >= 0) {
+ && e.getMessage().contains("Timeout while writing to output stream")) {
return true;
}

Back to the top