Skip to content

Commit

Permalink
8319628: DateFormat does not mention IllegalArgumentException for inv…
Browse files Browse the repository at this point in the history
…alid style args

Reviewed-by: naoto
  • Loading branch information
Justin Lu committed Nov 14, 2023
1 parent d725b73 commit d5abe49
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/java.base/share/classes/java/text/DateFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,12 @@
* normalization. The date is represented as a {@code Date} object or
* as the milliseconds since January 1, 1970, 00:00:00 GMT.
*
* <p>{@code DateFormat} provides many class methods for obtaining default date/time
* <p>{@code DateFormat} provides static factory methods for obtaining default date/time
* formatters based on the default or a given locale and a number of formatting
* styles. The formatting styles include {@link #FULL}, {@link #LONG}, {@link #MEDIUM}, and {@link #SHORT}. More
* detail and examples of using these styles are provided in the method
* styles. The formatting styles include {@link #FULL}, {@link #LONG}, {@link #MEDIUM}, and {@link #SHORT}.
* For any of the factory methods with the parameter <i>style</i>, an {@code
* IllegalArgumentException} will be thrown if <i>style</i> is not equal to any
* of the defined formatting styles. More detail and examples of using these styles are provided in the method
* descriptions.
*
* <p>{@code DateFormat} helps you to format and parse dates for any locale.
Expand Down Expand Up @@ -162,7 +164,7 @@
* {@code null}, but any subsequent operations on the same instance may throw
* {@code NullPointerException}.</li>
* <li>The {@link #getCalendar()}, {@link #getNumberFormat()} and
* {@link getTimeZone()} methods may return {@code null}, if the respective
* {@link #getTimeZone()} methods may return {@code null}, if the respective
* values of this instance is set to {@code null} through the corresponding
* setter methods. For Example: {@link #getTimeZone()} may return {@code null},
* if the {@code TimeZone} value of this instance is set as
Expand Down

1 comment on commit d5abe49

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.