[OpenJDK 2D-Dev] RFR: 8269223: -Xcheck:jni WARNINGs working with fonts on Linux [v4]

Maxim Kartashev github.com+28651297+mkartashev at openjdk.java.net
Mon Aug 16 07:51:14 UTC 2021

On Fri, 13 Aug 2021 14:28:53 GMT, Phil Race <prr at openjdk.org> wrote:

>> But `getFontMetrics()` is the primary "entry point" that generated all the JNI warnings in the first place. And I'm also not sure that we could've gotten all the warnings on Windows without `JFrame`.
> So what's wrong with
> g2d.setFont(font);
> FontMetrics metrics = g2d.getFontMetrics(font);
> ?
> No frame needed.

Indeed. Changed the test per your suggestions.


PR: https://git.openjdk.java.net/jdk/pull/4572

More information about the 2d-dev mailing list