Integrated: 8311188: Simplify and modernize equals and hashCode in java.text
Pavel Rappo
prappo at openjdk.org
Tue Jul 18 15:15:20 UTC 2023
On Mon, 3 Jul 2023 11:12:32 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
> Please review this PR to use modern APIs and language features to simplify `equals` and `hashCode` in the java.text area.
>
> * Some changes to `equals` and `hashCode` are refactoring rather than modernization. Such changes can be as trivial as rearranging, adding, or commenting checks.
>
> * java.text area contains more classes whose `equals` and `hashCode` could be simplified; for example: sun.text.CompactByteArray or java.text.DigitList. However, I found no evidence of `equals` and `hashCode` in those classes being used in source or tests. Since writing new tests in this case seems unreasonable, I **excluded** those classes from this PR.
This pull request has now been integrated.
Changeset: 1dfb0fb3
Author: Pavel Rappo <prappo at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/1dfb0fb3e22c3616fdfa3a8249be526c44dbe890
Stats: 127 lines in 15 files changed: 29 ins; 55 del; 43 mod
8311188: Simplify and modernize equals and hashCode in java.text
Reviewed-by: lancea, naoto, rriggs
-------------
PR: https://git.openjdk.org/jdk/pull/14752
More information about the core-libs-dev
mailing list