[OpenJDK 2D-Dev] RFR: 8221741 ClassCastException happen when fontconfig.properties was used

Langer, Christoph christoph.langer at sap.com
Mon Feb 17 13:02:09 UTC 2020


Hi Mario,

> > I think that's better and more explicit compared to having a strange
> ClassCastException.
> 
> Oh, yes, I agree it's a better message.
> 
> Would they get this error during the font initialisation or at runtime
> during use? I think this is one could be an interesting change from
> the current status.

The Error is triggered when the fonts are initialized - I think that part does not change.

> The reason I asked is because I'm aware of a few people getting the
> weird error when all it meant was a misconfiguration (I think this
> hits more because the closed JDK does come with some fonts if I
> remember correctly while OpenJDK requires fonts to be installed on the
> system), but I was afraid the new "NULL FONT HANDLE" would make the
> jdk survive longer than necessary.

Right, I think the font configuration can be very different between machines, releases etc. But after my change, if you have at least one physical font at hand, you'll get it (or something) as default font. If there's no physical font, the user should end up with the error. I don't think the JDK survives longer than necessary - it should rather be able to run in a special configuration situation where it would run into errors before (as on our AIX machines).

But prove me, if I'm wrong ��

Cheers
Christoph



More information about the 2d-dev mailing list