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

Maxim Kartashev github.com+28651297+mkartashev at openjdk.java.net
Wed Jun 30 10:42:44 UTC 2021


> Added an `ExceptionCheck()` followed by `ExceptionDescribe()` and `ExceptionClear()` immediately after the Java calls made from the callback function `ReadTTFontFileFunc()` in `freetypeScaler.c`. 
> 
> The exception(s) need to be cleared because we're not returning immediately to Java that would've been able to handle them gracefully. And in order not to loose the exception entirely (even though the return value would also indicate an error condition), print out the exception with `ExceptionDescribe()` to aid in debugging.

Maxim Kartashev has updated the pull request incrementally with one additional commit since the last revision:

  Addressed PR comments
  
  1. Allowed test to run on any platform.
  2. Trimmed comments to fit in with 80 columns.
  3. Removed unnecessayr comments.
  4. Made the ExceptionDescribe() calls conditional on the value of
     FontUtilities.debugFonts()

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/4572/files
  - new: https://git.openjdk.java.net/jdk/pull/4572/files/1622a169..d1bc82e8

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=4572&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=4572&range=00-01

  Stats: 20 lines in 2 files changed: 7 ins; 4 del; 9 mod
  Patch: https://git.openjdk.java.net/jdk/pull/4572.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/4572/head:pull/4572

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


More information about the 2d-dev mailing list