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

Maxim Kartashev github.com+28651297+mkartashev at openjdk.java.net
Fri Aug 13 12:27:53 UTC 2021


On Thu, 12 Aug 2021 21:57:37 GMT, Phil Race <prr at openjdk.org> wrote:

>> Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Addressed PR comments
>>   
>>   1. Added CHECK_NULL() to awt_Component.cpp
>
> test/jdk/java/awt/font/JNICheck/FreeTypeScalerJNICheck.java line 36:
> 
>> 34: import java.awt.geom.Rectangle2D;
>> 35: import java.awt.image.*;
>> 36: import java.io.*;
> 
> Can we get rid of all these wild card imports ?

Sure, replaced with single-class imports.

> test/jdk/java/awt/font/JNICheck/FreeTypeScalerJNICheck.java line 59:
> 
>> 57:         for (String ff : families)
>> 58:         {
>> 59:             Font font = Font.decode(ff);
> 
> Gosh, does anyone still use decode() ? I keep forgetting it exists.
> You have all the family names, why not just new Font(ff, Font.PLAIN, 12) ?

OK, changed to `new Font(...)`.

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

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


More information about the 2d-dev mailing list