Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8304098

[testbug] Test compilation failure in ControlUtils.java after JDK-8292353

XMLWordPrintable

      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.

            jvos Johan Vos
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: