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

Baesken, Matthias matthias.baesken at sap.com
Fri Oct 18 12:54:09 UTC 2019


Thanks  for the reviews .

I'll remove the variable before pushing .

Best regards, Matthias


From: Langer, Christoph <christoph.langer at sap.com>
Sent: Freitag, 18. Oktober 2019 14:05
To: Phil Race <philip.race at oracle.com>; 2d-dev at openjdk.java.net; Baesken, Matthias <matthias.baesken at sap.com>
Subject: RE: [OpenJDK 2D-Dev] RFR [XS] : 8232381: add result NULL-checking to freetypeScaler.c

+1 (also to remove the variable and use 0.0f in place)

/Christoph

From: 2d-dev <2d-dev-bounces at openjdk.java.net<mailto: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<mailto: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/73b51b00/attachment-0001.html>


More information about the 2d-dev mailing list