8073347: javadoc of Formattable messed up by JDK-8019857
authorbpb
Tue, 17 Feb 2015 12:02:38 -0800 (2015-02-17)
changeset 29015 82642b0f0945
parent 29014 d42eb758b048
child 29016 f14b019bfdfa
8073347: javadoc of Formattable messed up by JDK-8019857 Summary: Change sample code formatting to the currently blessed idiom. Reviewed-by: martin
jdk/src/java.base/share/classes/java/util/Formattable.java
--- a/jdk/src/java.base/share/classes/java/util/Formattable.java	Tue Feb 17 11:44:51 2015 -0800
+++ b/jdk/src/java.base/share/classes/java/util/Formattable.java	Tue Feb 17 12:02:38 2015 -0800
@@ -36,14 +36,14 @@
  * For example, the following class prints out different representations of a
  * stock's name depending on the flags and length constraints:
  *
- * {@code
+ * <pre> {@code
  *   import java.nio.CharBuffer;
  *   import java.util.Formatter;
  *   import java.util.Formattable;
  *   import java.util.Locale;
  *   import static java.util.FormattableFlags.*;
  *
- *  ...
+ *   ...
  *
  *   public class StockName implements Formattable {
  *       private String symbol, companyName, frenchCompanyName;
@@ -89,12 +89,12 @@
  *           return String.format("%s - %s", symbol, companyName);
  *       }
  *   }
- * }
+ * }</pre>
  *
  * <p> When used in conjunction with the {@link java.util.Formatter}, the above
  * class produces the following output for various format strings.
  *
- * {@code
+ * <pre> {@code
  *   Formatter fmt = new Formatter();
  *   StockName sn = new StockName("HUGE", "Huge Fruit, Inc.",
  *                                "Fruit Titanesque, Inc.");
@@ -104,7 +104,7 @@
  *   fmt.format("%-10.8s", sn);              //   -> "HUGE      "
  *   fmt.format("%.12s", sn);                //   -> "Huge Fruit,*"
  *   fmt.format(Locale.FRANCE, "%25s", sn);  //   -> "   Fruit Titanesque, Inc."
- * }
+ * }</pre>
  *
  * <p> Formattables are not necessarily safe for multithreaded access.  Thread
  * safety is optional and may be enforced by classes that extend and implement