Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Hammer2019-05-24 12:21:23 -0400
committerKarsten Thoms2019-06-11 21:32:23 -0400
commitff36325e43f71a96a7927f2a5089af77e28f228b (patch)
treeec21374ebe0e67143236da93ac4e890d4c66db1d
parentbd8df14271a7b3e02edf3be120747adc880d4b39 (diff)
downloadeclipse.platform.debug-ff36325e43f71a96a7927f2a5089af77e28f228b.tar.gz
eclipse.platform.debug-ff36325e43f71a96a7927f2a5089af77e28f228b.tar.xz
eclipse.platform.debug-ff36325e43f71a96a7927f2a5089af77e28f228b.zip
String.indexOf can be replaced with String.containsI20190613-0210I20190612-1800I20190612-0115
Change-Id: Ia3ff4eebc3799a8c1b8f6bbcddd200d08e1d966b Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
-rw-r--r--org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingContextAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveRenderingContextAction.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java2
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java2
5 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
index 1b5deeab6..fc617622e 100644
--- a/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
+++ b/org.eclipse.debug.examples.ui/src/org/eclipse/debug/examples/ui/pda/breakpoints/PDABreakpointAdapter.java
@@ -191,7 +191,7 @@ public class PDABreakpointAdapter implements IToggleBreakpointsTargetExtension {
String lineText = document.get(information.getOffset(), information.getLength());
if (lineText.startsWith(":")) { //$NON-NLS-1$
String label = lineText.substring(1);
- if (source.indexOf("call " + label) >= 0) { //$NON-NLS-1$
+ if (source.contains("call " + label)) { //$NON-NLS-1$
return label;
}
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingContextAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingContextAction.java
index e347d88b7..d517e68a9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingContextAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/AddMemoryRenderingContextAction.java
@@ -57,7 +57,7 @@ public class AddMemoryRenderingContextAction implements IViewActionDelegate {
IMemoryRenderingContainer selectedPane = null;
for (int i = 0; i < viewPanes.length; i++) {
- if (actionId.indexOf(viewPanes[i].getId()) != -1) {
+ if (actionId.contains(viewPanes[i].getId())) {
selectedPane = viewPanes[i];
break;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveRenderingContextAction.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveRenderingContextAction.java
index 92d2653a3..d671dc806 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveRenderingContextAction.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/memory/RemoveRenderingContextAction.java
@@ -70,7 +70,7 @@ public class RemoveRenderingContextAction implements IViewActionDelegate {
IMemoryRenderingContainer selectedPane = null;
for (int i = 0; i < viewPanes.length; i++) {
- if (actionId.indexOf(viewPanes[i].getId()) != -1) {
+ if (actionId.contains(viewPanes[i].getId())) {
selectedPane = viewPanes[i];
break;
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
index ab12e95cc..e101bd4a6 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/EnvironmentTab.java
@@ -557,7 +557,7 @@ public class EnvironmentTab extends AbstractLaunchConfigurationTab {
String value= var.getValue();
MultipleInputDialog dialog= new MultipleInputDialog(getShell(), LaunchConfigurationsMessages.EnvironmentTab_11);
dialog.addTextField(NAME_LABEL, originalName, false);
- if(value != null && value.indexOf(System.getProperty("line.separator")) > -1) { //$NON-NLS-1$
+ if(value != null && value.contains(System.getProperty("line.separator"))) { //$NON-NLS-1$
dialog.addMultilinedVariablesField(VALUE_LABEL, value, true);
}
else {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
index 0ec29a56b..7e66963da 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/WorkingDirectoryBlock.java
@@ -330,7 +330,7 @@ public abstract class WorkingDirectoryBlock extends AbstractLaunchConfigurationT
setMessage(null);
// if variables are present, we cannot resolve the directory
String workingDirPath = getWorkingDirectoryText();
- if (workingDirPath.indexOf("${") >= 0) { //$NON-NLS-1$
+ if (workingDirPath.contains("${")) { //$NON-NLS-1$
IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager();
try {
manager.validateStringVariables(workingDirPath);

Back to the top