The backport of JDK-8292353 to jfx17u, while clean, causes the test compilation to fail:
$ gradle test
modules/javafx.controls/src/test/java/test/javafx/scene/control/ControlUtils.java:110: error: pattern matching in instanceof is not supported in -source 11
if (n instanceof TreeTableCell c) {
^
(use -source 16 or higher to enable pattern matching in instanceof)
modules/javafx.controls/src/test/java/test/javafx/scene/control/TreeAndTableViewTest.java:108: error: pattern matching in instanceof is not supported in -source 11
if (x instanceof TableColumnHeader n) {
^
(use -source 16 or higher to enable pattern matching in instanceof)
2 errors
The pattern matching instanceof needs to be replaced with an ordinary instance of and a cast.
$ gradle test
modules/javafx.controls/src/test/java/test/javafx/scene/control/ControlUtils.java:110: error: pattern matching in instanceof is not supported in -source 11
if (n instanceof TreeTableCell c) {
^
(use -source 16 or higher to enable pattern matching in instanceof)
modules/javafx.controls/src/test/java/test/javafx/scene/control/TreeAndTableViewTest.java:108: error: pattern matching in instanceof is not supported in -source 11
if (x instanceof TableColumnHeader n) {
^
(use -source 16 or higher to enable pattern matching in instanceof)
2 errors
The pattern matching instanceof needs to be replaced with an ordinary instance of and a cast.
- relates to
-
JDK-8292353 TableRow vs. TreeTableRow: inconsistent visuals in cell selection mode
- Resolved