<i18n dev> RFR: 5066247: Refine the spec of equals() and hashCode() for j.text.Format classes
Justin Lu
jlu at openjdk.org
Mon Aug 28 21:33:34 UTC 2023
Please review this PR which refines the spec of `equals()` and `hashCode()` in `java.text.Format` related classes.
The current spec for most of these methods is either "_Overrides <method_name>_" or are incomplete/wrong (i.e. see `ChoiceFormat`).
This fix adjusts the spec to provide a consistent definition for the overridden methods and specify what is being compared/used to generate a hash code value.
For implementations that use at most a few fields, the values are stated, otherwise a more general term is used as a substitution (i.e. see `DecimalFormat`).
-------------
Commit messages:
- Remove additional see tag from dFmt.hashCode()
- Include CompactNumberFormat.java
- Drop 'Obeys the general contract' wording and further standardizing
- Touch up and standardize
- Update rest of related classes
- Adjust ChoiceFormat (refer to public method)
- Update NumberFormat
- Update DecimalFormat
- Update DateFormat
- Adjust ChoiceFormat
- ... and 1 more: https://git.openjdk.org/jdk/compare/7c169a42...84bd4708
Changes: https://git.openjdk.org/jdk/pull/15459/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15459&range=00
Issue: https://bugs.openjdk.org/browse/JDK-5066247
Stats: 117 lines in 9 files changed: 92 ins; 1 del; 24 mod
Patch: https://git.openjdk.org/jdk/pull/15459.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/15459/head:pull/15459
PR: https://git.openjdk.org/jdk/pull/15459
More information about the i18n-dev
mailing list