Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java8
-rw-r--r--org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java6
2 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java
index cbc7b5812..db8b2ffea 100644
--- a/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java
+++ b/org.eclipse.jface.text.tests/src/org/eclipse/jface/text/tests/AbstractPairMatcherTest.java
@@ -377,13 +377,13 @@ public abstract class AbstractPairMatcherTest {
* @return the created test case
*/
public TestCase createTestCase(String str) {
- int pos1= str.indexOf("%");
+ int pos1= str.indexOf('%');
assertFalse(pos1 == -1);
- int pos2= str.lastIndexOf("%");
+ int pos2= str.lastIndexOf('%');
boolean selectionTest= pos1 != pos2;
- int match1= str.indexOf("#");
- int match2= str.lastIndexOf("#");
+ int match1= str.indexOf('#');
+ int match2= str.lastIndexOf('#');
boolean enclosingTest= match1 != match2;
// account for the length of marker characters
diff --git a/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java b/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java
index d0a6b3fcc..517939d27 100644
--- a/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java
+++ b/org.eclipse.text.tests/src/org/eclipse/text/tests/FindReplaceDocumentAdapterTest.java
@@ -355,7 +355,7 @@ public class FindReplaceDocumentAdapterTest {
String contents= "Unix\nWindows\r\nMac\rEnd";
fDocument.set(contents);
- int n= contents.indexOf("\n");
+ int n= contents.indexOf('\n');
int rn= contents.indexOf("\r\n");
int r= contents.indexOf("\rEnd");
@@ -378,7 +378,7 @@ public class FindReplaceDocumentAdapterTest {
String contents= "Unix\n[\\R]\\R\r\n";
fDocument.set(contents);
- int n= contents.indexOf("\n");
+ int n= contents.indexOf('\n');
int rn= contents.indexOf("\r\n");
IRegion region= adapter.find(0, "[a-zA-Z\\t{\\\\R}]*\\{?\\R", true, false, false, true);
@@ -401,7 +401,7 @@ public class FindReplaceDocumentAdapterTest {
String contents= "+[\\R]\\R\r\n";
fDocument.set(contents);
- int n= contents.indexOf("[");
+ int n= contents.indexOf('[');
int rn= contents.indexOf("\r\n");
IRegion region= adapter.find(0, "[a-zA-Z\\t{\\\\R}]*\\{?\\R", true, false, false, true);

Back to the top