< prev index next >

src/java.base/share/classes/java/util/regex/Matcher.java

Print this page
rev 12318 : [mq]: 8131034-Cleanup-in-j.u.regex.Pattern.quote

@@ -61,11 +61,11 @@
  * More information about a successful match can be obtained by querying the
  * state of the matcher.
  *
  * <p> A matcher finds matches in a subset of its input called the
  * <i>region</i>. By default, the region contains all of the matcher's input.
- * The region can be modified via the{@link #region region} method and queried
+ * The region can be modified via the {@link #region region} method and queried
  * via the {@link #regionStart regionStart} and {@link #regionEnd regionEnd}
  * methods. The way that the region boundaries interact with some pattern
  * constructs can be changed. See {@link #useAnchoringBounds
  * useAnchoringBounds} and {@link #useTransparentBounds useTransparentBounds}
  * for more details.

@@ -1637,19 +1637,19 @@
      * @return  The string representation of this matcher
      * @since 1.5
      */
     public String toString() {
         StringBuilder sb = new StringBuilder();
-        sb.append("java.util.regex.Matcher");
-        sb.append("[pattern=" + pattern());
-        sb.append(" region=");
-        sb.append(regionStart() + "," + regionEnd());
-        sb.append(" lastmatch=");
+        sb.append("java.util.regex.Matcher")
+                .append("[pattern=").append(pattern())
+                .append(" region=")
+                .append(regionStart()).append(',').append(regionEnd())
+                .append(" lastmatch=");
         if ((first >= 0) && (group() != null)) {
             sb.append(group());
         }
-        sb.append("]");
+        sb.append(']');
         return sb.toString();
     }
 
     /**
      * <p>Returns true if the end of input was hit by the search engine in
< prev index next >