src/java.base/share/classes/java/text/MessageFormat.java
changeset 58242 94bb65cb37d3
parent 57956 e0b8b019d2f5
child 58288 48e480e56aad
--- a/src/java.base/share/classes/java/text/MessageFormat.java	Fri Sep 20 11:33:30 2019 +0800
+++ b/src/java.base/share/classes/java/text/MessageFormat.java	Fri Sep 20 11:07:52 2019 +0100
@@ -362,8 +362,8 @@
      * <a href="#patterns">class description</a>.
      *
      * @param pattern the pattern for this message format
-     * @exception IllegalArgumentException if the pattern is invalid
-     * @exception NullPointerException if {@code pattern} is
+     * @throws    IllegalArgumentException if the pattern is invalid
+     * @throws    NullPointerException if {@code pattern} is
      *            {@code null}
      */
     public MessageFormat(String pattern) {
@@ -381,8 +381,8 @@
      *
      * @param pattern the pattern for this message format
      * @param locale the locale for this message format
-     * @exception IllegalArgumentException if the pattern is invalid
-     * @exception NullPointerException if {@code pattern} is
+     * @throws    IllegalArgumentException if the pattern is invalid
+     * @throws    NullPointerException if {@code pattern} is
      *            {@code null}
      * @since 1.4
      */
@@ -430,8 +430,8 @@
      * <a href="#patterns">class description</a>.
      *
      * @param pattern the pattern for this message format
-     * @exception IllegalArgumentException if the pattern is invalid
-     * @exception NullPointerException if {@code pattern} is
+     * @throws    IllegalArgumentException if the pattern is invalid
+     * @throws    NullPointerException if {@code pattern} is
      *            {@code null}
      */
     @SuppressWarnings("fallthrough") // fallthrough in switch is expected, suppress it
@@ -614,7 +614,7 @@
      * than <code>newFormats.length</code> are replaced.
      *
      * @param newFormats the new formats to use
-     * @exception NullPointerException if <code>newFormats</code> is null
+     * @throws    NullPointerException if <code>newFormats</code> is null
      * @since 1.4
      */
     public void setFormatsByArgumentIndex(Format[] newFormats) {
@@ -646,7 +646,7 @@
      * the <code>parse</code> methods.
      *
      * @param newFormats the new formats to use
-     * @exception NullPointerException if <code>newFormats</code> is null
+     * @throws    NullPointerException if <code>newFormats</code> is null
      */
     public void setFormats(Format[] newFormats) {
         int runsToCopy = newFormats.length;
@@ -698,7 +698,7 @@
      *
      * @param formatElementIndex the index of a format element within the pattern
      * @param newFormat the format to use for the specified format element
-     * @exception ArrayIndexOutOfBoundsException if {@code formatElementIndex} is equal to or
+     * @throws    ArrayIndexOutOfBoundsException if {@code formatElementIndex} is equal to or
      *            larger than the number of format elements in the pattern string
      */
     public void setFormat(int formatElementIndex, Format newFormat) {
@@ -829,10 +829,10 @@
                   in the output string.
      * @return the string buffer passed in as {@code result}, with formatted
      * text appended
-     * @exception IllegalArgumentException if an argument in the
+     * @throws    IllegalArgumentException if an argument in the
      *            <code>arguments</code> array is not of the type
      *            expected by the format element(s) that use it.
-     * @exception NullPointerException if {@code result} is {@code null}
+     * @throws    NullPointerException if {@code result} is {@code null}
      */
     public final StringBuffer format(Object[] arguments, StringBuffer result,
                                      FieldPosition pos)
@@ -850,11 +850,11 @@
      * @param pattern   the pattern string
      * @param arguments object(s) to format
      * @return the formatted string
-     * @exception IllegalArgumentException if the pattern is invalid,
+     * @throws    IllegalArgumentException if the pattern is invalid,
      *            or if an argument in the <code>arguments</code> array
      *            is not of the type expected by the format element(s)
      *            that use it.
-     * @exception NullPointerException if {@code pattern} is {@code null}
+     * @throws    NullPointerException if {@code pattern} is {@code null}
      */
     public static String format(String pattern, Object ... arguments) {
         MessageFormat temp = new MessageFormat(pattern);
@@ -875,10 +875,10 @@
      * @param result where text is appended.
      * @param pos keeps track on the position of the first replaced argument
      *            in the output string.
-     * @exception IllegalArgumentException if an argument in the
+     * @throws    IllegalArgumentException if an argument in the
      *            <code>arguments</code> array is not of the type
      *            expected by the format element(s) that use it.
-     * @exception NullPointerException if {@code result} is {@code null}
+     * @throws    NullPointerException if {@code result} is {@code null}
      */
     public final StringBuffer format(Object arguments, StringBuffer result,
                                      FieldPosition pos)
@@ -915,8 +915,8 @@
      *
      * @param arguments an array of objects to be formatted and substituted.
      * @return AttributedCharacterIterator describing the formatted value.
-     * @exception NullPointerException if <code>arguments</code> is null.
-     * @exception IllegalArgumentException if an argument in the
+     * @throws    NullPointerException if <code>arguments</code> is null.
+     * @throws    IllegalArgumentException if an argument in the
      *            <code>arguments</code> array is not of the type
      *            expected by the format element(s) that use it.
      * @since 1.4
@@ -968,7 +968,7 @@
      * @param source the string to parse
      * @param pos    the parse position
      * @return an array of parsed objects
-     * @exception NullPointerException if {@code pos} is {@code null}
+     * @throws    NullPointerException if {@code pos} is {@code null}
      *            for a non-null {@code source} string.
      */
     public Object[] parse(String source, ParsePosition pos) {
@@ -1057,7 +1057,7 @@
      *
      * @param source A <code>String</code> whose beginning should be parsed.
      * @return An <code>Object</code> array parsed from the string.
-     * @exception ParseException if the beginning of the specified string
+     * @throws    ParseException if the beginning of the specified string
      *            cannot be parsed.
      */
     public Object[] parse(String source) throws ParseException {
@@ -1253,7 +1253,7 @@
      * {@code Field.ARGUMENT} as the field attribute, the location of
      * the first replaced argument will be set in it.
      *
-     * @exception IllegalArgumentException if an argument in the
+     * @throws    IllegalArgumentException if an argument in the
      *            <code>arguments</code> array is not of the type
      *            expected by the format element(s) that use it.
      */