On Sun, 28 Jun 2026 19:23:05 GMT, Daniel Gredler <[email protected]> wrote:

> Update code in the package `sun.font` to make use of the `instanceof` pattern 
> variable. Includes `equals` methods and a few methods using 
> `ClassCastException` for flow control.
> 
> While looking through this code, I've noticed a few pre-existing suspicious 
> differences between `equals` and `hashCode` implementations, but have not 
> made any functional changes to fix this (best to address separately, if 
> needed).
> 
> Tests checked locally on Linux, Windows and macOS:
> - make test TEST="jtreg:test/jdk/java/awt/font"
> - make test TEST="jtreg:test/jdk/java/awt/Graphics2D/DrawString"
> 
> ---------
> - [x] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

This pull request has now been integrated.

Changeset: 436e3647
Author:    Daniel Gredler <[email protected]>
URL:       
https://git.openjdk.org/jdk/commit/436e3647cb8f51e602cd211126e7ca70a3af696e
Stats:     347 lines in 22 files changed: 20 ins; 123 del; 204 mod

8387375: Update package sun.font to use instanceof pattern variable

Reviewed-by: prr, psadhukhan

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

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

Reply via email to