--- old/src/share/classes/java/lang/String.java 2012-12-28 16:48:01.041469215 -0500 +++ new/src/share/classes/java/lang/String.java 2012-12-28 16:48:00.865472200 -0500 @@ -615,10 +615,10 @@ } /** - * Returns true if, and only if, {@link #length()} is 0. + * Returns {@code true} if, and only if, {@link #length()} is {@code 0}. * - * @return true if {@link #length()} is 0, otherwise - * false + * @return {@code true} if {@link #length()} is {@code 0}, otherwise + * {@code false} * * @since 1.6 */ @@ -1229,23 +1229,23 @@ /** * Tests if two string regions are equal. *
- * A substring of this String object is compared to a substring + * A substring of this {@code String} object is compared to a substring * of the argument other. The result is true if these substrings * represent identical character sequences. The substring of this - * String object to be compared begins at index toffset - * and has length len. The substring of other to be compared - * begins at index ooffset and has length len. The - * result is false if and only if at least one of the following + * {@code String} object to be compared begins at index {@code toffset} + * and has length {@code len}. The substring of other to be compared + * begins at index {@code ooffset} and has length {@code len}. The + * result is {@code false} if and only if at least one of the following * is true: - *
this.charAt(toffset+k) != other.charAt(ooffset+k)
* - * A substring of this String object is compared to a substring - * of the argument other. The result is true if these + * A substring of this {@code String} object is compared to a substring + * of the argument {@code other}. The result is {@code true} if these * substrings represent character sequences that are the same, ignoring - * case if and only if ignoreCase is true. The substring of - * this String object to be compared begins at index - * toffset and has length len. The substring of - * other to be compared begins at index ooffset and - * has length len. The result is false if and only if + * case if and only if {@code ignoreCase} is true. The substring of + * this {@code String} object to be compared begins at index + * {@code toffset} and has length {@code len}. The substring of + * {@code other} to be compared begins at index {@code ooffset} and + * has length {@code len}. The result is {@code false} if and only if * at least one of the following is true: - *
- ** this.charAt(toffset+k) != other.charAt(ooffset+k) *
* Character.toLowerCase(this.charAt(toffset+k)) != Character.toLowerCase(other.charAt(ooffset+k)) @@ -1500,12 +1500,12 @@ * of {@code ch} in the range from 0 to 0xFFFF (inclusive), * this is the smallest value k such that: ** is true. For other values of {@code ch}, it is the * smallest value k such that: *- * (this.charAt(k) == ch) && (k >= fromIndex) + * (this.charAt(k) == ch) {@code &&} (k >= fromIndex) ** is true. In either case, if no such character occurs in this * string at or after position {@code fromIndex}, then @@ -1604,12 +1604,12 @@ * from 0 to 0xFFFF (inclusive), the index returned is the largest * value k such that: *- * (this.codePointAt(k) == ch) && (k >= fromIndex) + * (this.codePointAt(k) == ch) {@code &&} (k >= fromIndex) ** is true. For other values of {@code ch}, it is the * largest value k such that: *- * (this.charAt(k) == ch) && (k <= fromIndex) + * (this.charAt(k) == ch) {@code &&} (k <= fromIndex) ** is true. In either case, if no such character occurs in this * string at or before position {@code fromIndex}, then @@ -1690,7 +1690,7 @@ * *- * (this.codePointAt(k) == ch) && (k <= fromIndex) + * (this.codePointAt(k) == ch) {@code &&} (k <= fromIndex) *The returned index is the smallest value k for which: *
* If no such value of k exists, then {@code -1} is returned. * @@ -1799,7 +1799,7 @@ * *- * k >= fromIndex && this.startsWith(str, k) + * k >= fromIndex {@code &&} this.startsWith(str, k) *The returned index is the largest value k for which: *
* If no such value of k exists, then {@code -1} is returned. * @@ -2080,17 +2080,18 @@ * href="../util/regex/Pattern.html#sum">regular expression. * *- * k <= fromIndex && this.startsWith(str, k) + * k {@code <=} fromIndex {@code &&} this.startsWith(str, k) *An invocation of this method of the form - * str.matches(regex) yields exactly the + * str{@code .matches(}regex{@code )} yields exactly the * same result as the expression * - *
{@link java.util.regex.Pattern}.{@link - * java.util.regex.Pattern#matches(String,CharSequence) - * matches}(regex, str)+ *+ * {@link java.util.regex.Pattern}.{@link java.util.regex.Pattern#matches(String,CharSequence) + * matches(regex, str)} + ** * @param regex * the regular expression to which this string is to be matched * - * @return true if, and only if, this string matches the + * @return {@code true} if, and only if, this string matches the * given regular expression * * @throws PatternSyntaxException @@ -2124,18 +2125,20 @@ * given replacement. * *An invocation of this method of the form - * str.replaceFirst(regex, repl) + * str{@code .replaceFirst(}regex{@code ,} repl{@code )} * yields exactly the same result as the expression * - *
- * {@link java.util.regex.Pattern}.{@link java.util.regex.Pattern#compile - * compile}(regex).{@link - * java.util.regex.Pattern#matcher(java.lang.CharSequence) - * matcher}(str).{@link java.util.regex.Matcher#replaceFirst - * replaceFirst}(repl)+ *+ ** *+ * {@link java.util.regex.Pattern}.{@link + * java.util.regex.Pattern#compile compile}(regex).{@link + * java.util.regex.Pattern#matcher(java.lang.CharSequence) matcher}(str).{@link + * java.util.regex.Matcher#replaceFirst replaceFirst}(repl) + *
+ *- * Note that backslashes (\) and dollar signs ($) in the + * Note that backslashes ({@code \}) and dollar signs ({@code $}) in the * replacement string may cause the results to be different than if it were * being treated as a literal replacement string; see * {@link java.util.regex.Matcher#replaceFirst}. @@ -2147,7 +2150,7 @@ * @param replacement * the string to be substituted for the first match * - * @return The resulting String + * @return The resulting {@code String} * * @throws PatternSyntaxException * if the regular expression's syntax is invalid @@ -2167,18 +2170,20 @@ * given replacement. * *
An invocation of this method of the form - * str.replaceAll(regex, repl) + * str{@code .replaceAll(}regex{@code ,} repl{@code )} * yields exactly the same result as the expression * - *
- * {@link java.util.regex.Pattern}.{@link java.util.regex.Pattern#compile - * compile}(regex).{@link - * java.util.regex.Pattern#matcher(java.lang.CharSequence) - * matcher}(str).{@link java.util.regex.Matcher#replaceAll - * replaceAll}(repl)+ *+ ** *+ * {@link java.util.regex.Pattern}.{@link + * java.util.regex.Pattern#compile compile}(regex).{@link + * java.util.regex.Pattern#matcher(java.lang.CharSequence) matcher}(str).{@link + * java.util.regex.Matcher#replaceAll replaceAll}(repl) + *
+ *- * Note that backslashes (\) and dollar signs ($) in the + * Note that backslashes ({@code \}) and dollar signs ({@code $}) in the * replacement string may cause the results to be different than if it were * being treated as a literal replacement string; see * {@link java.util.regex.Matcher#replaceAll Matcher.replaceAll}. @@ -2190,7 +2195,7 @@ * @param replacement * the string to be substituted for each match * - * @return The resulting String + * @return The resulting {@code String} * * @throws PatternSyntaxException * if the regular expression's syntax is invalid @@ -2234,7 +2239,7 @@ * expression does not match any part of the input then the resulting array * has just one element, namely this string. * - *
The limit parameter controls the number of times the + *
The {@code limit} parameter controls the number of times the * pattern is applied and therefore affects the length of the resulting * array. If the limit n is greater than zero then the pattern * will be applied at most n - 1 times, the array's @@ -2245,7 +2250,7 @@ * the pattern will be applied as many times as possible, the array can * have any length, and trailing empty strings will be discarded. * - *
The string "boo:and:foo", for example, yields the + *
The string {@code "boo:and:foo"}, for example, yields the * following results with these parameters: * *
* *@@ -2256,33 +2261,34 @@ * *
+ * : *2 - *{ "boo", "and:foo" } {@code { "boo", "and:foo" }} *+ * : *5 - *{ "boo", "and", "foo" } {@code { "boo", "and", "foo" }} *+ * : *-2 - *{ "boo", "and", "foo" } {@code { "boo", "and", "foo" }} *+ * o *5 - *{ "b", "", ":and:f", "", "" } {@code { "b", "", ":and:f", "", "" }} *+ * o *-2 - *{ "b", "", ":and:f", "", "" } {@code { "b", "", ":and:f", "", "" }} *+ * o *0 - *{ "b", "", ":and:f" } {@code { "b", "", ":and:f" }} *An invocation of this method of the form - * str.split(regex, n) + * str.{@code split(}regex{@code ,} n{@code )} * yields the same result as the expression * *
- * {@link java.util.regex.Pattern}.{@link java.util.regex.Pattern#compile - * compile}(regex).{@link - * java.util.regex.Pattern#split(java.lang.CharSequence,int) - * split}(str, n) + ** * @@ -2364,7 +2370,7 @@ * argument of zero. Trailing empty strings are therefore not included in * the resulting array. * - *+ * {@link java.util.regex.Pattern}.{@link + * java.util.regex.Pattern#compile compile}(regex).{@link + * java.util.regex.Pattern#split(java.lang.CharSequence,int) split}(str, n) + *
*The string "boo:and:foo", for example, yields the following + *
The string {@code "boo:and:foo"}, for example, yields the following * results with these expressions: * *
* * @@ -2815,7 +2821,7 @@ * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -2828,7 +2834,7 @@ * formatter class specification. * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return A formatted string * @@ -2845,7 +2851,7 @@ * * @param l * The {@linkplain java.util.Locale locale} to apply during - * formatting. If l is null then no localization + * formatting. If {@code l} is {@code null} then no localization * is applied. * * @param format @@ -2859,7 +2865,7 @@ * limited by the maximum dimension of a Java array as defined by * The Java™ Virtual Machine Specification. * The behaviour on a - * null argument depends on the conversion. * * @throws java.util.IllegalFormatException @@ -2872,7 +2878,7 @@ * formatter class specification * * @throws NullPointerException - * If the format is null + * If the {@code format} is {@code null} * * @return A formatted string * @@ -3143,7 +3149,7 @@ * programmer should be aware that producing distinct integer results * for unequal objects may improve the performance of hash tables. *@@ -2373,9 +2379,9 @@ *
Result * *+ * : - *{ "boo", "and", "foo" } {@code { "boo", "and", "foo" }} *+ * o - *{ "b", "", ":and:f" } {@code { "b", "", ":and:f" }} *