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

SWinxy duke at openjdk.org
Thu Feb 23 17:55:59 UTC 2023


On Wed, 22 Feb 2023 20:49:43 GMT, SWinxy <duke at openjdk.org> wrote:

>> 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.

Gah. Alright.

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

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



More information about the client-libs-dev mailing list