RFR: 8298385: Some font classes rely on blind casting to implement Object.equals()

SWinxy duke at openjdk.org
Thu Jan 26 02:16:17 UTC 2023


Some also had two separate methods to check equality, one calling the other. Objects.equals() is used in some places as a replacement for a local copy of the function. In the end, the equals methods become quicker to understand their checks, more condensed, and becomes more in line with other equality methods in the JDK.

-------------

Commit messages:
 - Removal of AttributeValues.equals(Object, Object) did not replace with Object.equals
 - Reinstate public API methods
 - Forgor to update copyright year
 - Other font classes where equals(Object) can be improved
 - Revert variable name changes back to their original (instead of o1), suggested by ExE-Boss
 - Some font classes rely on blind casting to implement Object.equals()

Changes: https://git.openjdk.org/jdk/pull/10416/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=10416&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8298385
  Stats: 381 lines in 14 files changed: 42 ins; 215 del; 124 mod
  Patch: https://git.openjdk.org/jdk/pull/10416.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/10416/head:pull/10416

PR: https://git.openjdk.org/jdk/pull/10416



More information about the client-libs-dev mailing list