[547629] String.indexOf can be replaced with String.contains

Change-Id: I330e5538d6c3ec70677cf980f99f6789cdc6745c
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
diff --git a/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/util/SegmentSequence.java b/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/util/SegmentSequence.java
index 5651f70..9e14e42 100644
--- a/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/util/SegmentSequence.java
+++ b/plugins/org.eclipse.emf.common/src/org/eclipse/emf/common/util/SegmentSequence.java
@@ -138,7 +138,7 @@
     }
     // If the segment contains the delimiter...
     //
-    else if (segment.indexOf(delimiter) != -1)
+    else if (segment.contains(delimiter))
     {
       // Create a segment sequence for the segment and append that instead.
       //
@@ -2807,7 +2807,7 @@
         // If the segment contains the delimiter...
         //
         String segment = segments[i];
-        if (segment.indexOf(delimiter) != -1)
+        if (segment.contains(delimiter))
         {
           // Create a segment sequence for the segment, to reuse the efficient logic for splitting a name, and pull out the segments from that result.
           //
diff --git a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
index 5de8dd2..f5ee8d1 100644
--- a/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
+++ b/plugins/org.eclipse.emf.ecore/src/org/eclipse/emf/ecore/util/BasicExtendedMetaData.java
@@ -327,7 +327,7 @@
   public boolean isAnonymous(EClassifier eClassifier)
   {
     String name =  getExtendedMetaData(eClassifier).getName();
-    return name.length() == 0 || name.indexOf("_._") != -1;
+    return name.length() == 0 || name.contains("_._");
   }
 
   public String getName(EStructuralFeature eStructuralFeature)