On Sat, 28 Sep 2024 23:10:53 GMT, Karm Michal Babacek <[email protected]> wrote:
> # Font.java and information leakage
>
> @prrace @jerboaa
>
> Would this solution address the concern? Instead of passing on the whole
> throwable, we just inspect it and if it is this particular one, we pass on
> the information to the user?
>
> ```
> +++ b/src/java.desktop/share/classes/java/awt/Font.java
> @@ -971,6 +971,9 @@ public static Font[] createFonts(InputStream fontStream)
> }
> return createFont0(fontFormat, fontStream, true, tracker);
> } catch (InterruptedException e) {
> + if (e.getCause().getMessage().contains("java.home property not
> set")) {
> + throw new IOException("Problem reading font data. java.home
> property not set.");
> + }
> throw new IOException("Problem reading font data.");
> ```
I retract this. It's not that inconvenient and I don't want to complicate this
PR.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20169#issuecomment-2381602619