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

SWinxy duke at openjdk.org
Wed Feb 22 20:49:43 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.

SWinxy has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:

 - Merge branch 'master' into font_equals
 - Removal of AttributeValues.equals(Object, Object) did not replace with Object.equals
 - Reinstate public API methods
   
   Whoops
 - 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()
   
   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.

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/10416/files
  - new: https://git.openjdk.org/jdk/pull/10416/files/080a4b16..c3e564ef

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=10416&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=10416&range=00-01

  Stats: 550789 lines in 8696 files changed: 271826 ins; 172577 del; 106386 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