[OpenJDK 2D-Dev] RFR [XS] : 8232381: add result NULL-checking to freetypeScaler.c
Langer, Christoph
christoph.langer at sap.com
Fri Oct 18 12:04:47 UTC 2019
+1 (also to remove the variable and use 0.0f in place)
/Christoph
From: 2d-dev <2d-dev-bounces at openjdk.java.net> On Behalf Of Phil Race
Sent: Donnerstag, 17. Oktober 2019 21:34
To: 2d-dev at openjdk.java.net
Subject: Re: [OpenJDK 2D-Dev] RFR [XS] : 8232381: add result NULL-checking to freetypeScaler.c
+ jfloat advanceDefault = 0.0f;
+ (*env)->SetFloatField(env, metrics, sunFontIDs.xFID, advanceDefault);
+ (*env)->SetFloatField(env, metrics, sunFontIDs.yFID, advanceDefault);
I don't think we need a variable here. Make it :
+ (*env)->SetFloatField(env, metrics, sunFontIDs.xFID, 0.0f);
+ (*env)->SetFloatField(env, metrics, sunFontIDs.yFID, 0.0f);
-phil.
On 10/17/19 12:22 AM, Baesken, Matthias wrote:
Hello, please review the following small webrev .
Java_sun_font_FreetypeFontScaler_getGlyphImageNative might return NULL which should be checked , the change add one missing check .
Bug/webrev :
https://bugs.openjdk.java.net/browse/JDK-8232381
http://cr.openjdk.java.net/~mbaesken/webrevs/8232381.0/
Thanks and regards, Matthias
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/2d-dev/attachments/20191018/fffab3c9/attachment.html>
More information about the 2d-dev
mailing list