Skip to content

Commit

Permalink
8318487: Specification of the ListFormat.equals() method can be improved
Browse files Browse the repository at this point in the history
Reviewed-by: joehw, rriggs, lancea, iris
  • Loading branch information
naotoj authored and pull[bot] committed Dec 19, 2023
1 parent b00aa92 commit 8336756
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/java.base/share/classes/java/text/ListFormat.java
Original file line number Diff line number Diff line change
Expand Up @@ -500,11 +500,12 @@ public AttributedCharacterIterator formatToCharacterIterator(Object arguments) {
}

/**
* Checks if this {@code ListFormat} is equal to another {@code ListFormat}.
* The comparison is based on the {@code Locale} and formatting patterns, given or
* generated with {@code Locale}, {@code Type}, and {@code Style}.
* @param obj the object to check, {@code null} returns {@code false}
* @return {@code true} if this is equals to the other {@code ListFormat}
* Compares the specified object with this {@code ListFormat} for equality.
* Returns {@code true} if the specified object is also a {@code ListFormat}, and
* {@code locale} and {@code patterns}, returned from {@link #getLocale()}
* and {@link #getPatterns()} respectively, are equal.
* @param obj the object to be compared for equality.
* @return {@code true} if the specified object is equal to this {@code ListFormat}
*/
@Override
public boolean equals(Object obj) {
Expand Down

0 comments on commit 8336756

Please sign in to comment.