[OpenJDK 2D-Dev] RFR [XS] : 8232381: add result NULL-checking to freetypeScaler.c

Phil Race philip.race at oracle.com
Thu Oct 17 19:34:13 UTC 2019


+ 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/20191017/9c8c44b8/attachment.html>


More information about the 2d-dev mailing list