Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2019-06-17 10:17:19 +0000
committerLars Vogel2019-06-17 10:17:19 +0000
commit43300463fb06f41e7b13c128427de112194370de (patch)
tree1ee1cf1c77b2e0b324d09da6b766c44df47a3dc8
parent8def8098992f4ea0f6dd016a0d2d5c2c6b7a814f (diff)
downloadeclipse.platform.text-43300463fb06f41e7b13c128427de112194370de.tar.gz
eclipse.platform.text-43300463fb06f41e7b13c128427de112194370de.tar.xz
eclipse.platform.text-43300463fb06f41e7b13c128427de112194370de.zip
Use String.contains instead of indexOf
Change-Id: I8e30423f946361f2d743f051bfbb6dbff796e86b Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java
index feda1f397..9475b77e3 100644
--- a/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java
+++ b/org.eclipse.search.tests/src/org/eclipse/search/tests/filesearch/SearchResultPageTest.java
@@ -129,7 +129,7 @@ public class SearchResultPageTest {
int itemCount= result.getMatchCount(element);
assertTrue(itemCount > 0);
if (itemCount > 1)
- assertTrue(item.getText().indexOf(String.valueOf(itemCount)) >= 0);
+ assertTrue(item.getText().contains(String.valueOf(itemCount)));
}
@Test

Back to the top