RFR: 8291853: [CSS] ClassCastException in CssStyleHelper calculateValue

Marius Hanl mhanl at openjdk.org
Thu Nov 10 20:02:37 UTC 2022


On Thu, 10 Nov 2022 17:52:50 GMT, Andy Goryachev <angorya at openjdk.org> wrote:

> A race condition exists where a derived color depends on another derived color which has not been yet defined or processed.  The only side effect of this condition is a ClassCastException - the color eventually gets resolved.
> 
> Solution: initialize the derived color to transparent earlier to suppress the exception.
> 
> This was also a test bug https://bugs.openjdk.org/browse/JDK-8198604

modules/javafx.controls/src/main/resources/com/sun/javafx/scene/control/skin/modena/modena.css line 382:

> 380: 
> 381:     /* avoid race condition during initialization */
> 382:     -fx-table-cell-border-color: transparent;

A bit of a nitpick, but this should be next to the other cell colors, so in line 360 under `-fx-cell-focus-inner-border`. 
Also, we should probably add a description to the color like the other variables have here instead of explaining why it is here. :)

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

PR: https://git.openjdk.org/jfx/pull/947


More information about the openjfx-dev mailing list