Skip to content

Commit

Permalink
8304098: [testbug] Test compilation failure in ControlUtils.java afte…
Browse files Browse the repository at this point in the history
…r JDK-8292353

Reviewed-by: kcr
  • Loading branch information
Johan Vos committed Mar 14, 2023
1 parent 55f5576 commit 5ff6556
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
Expand Up @@ -107,7 +107,8 @@ public static TreeTableView<String> createTreeTableView() {
public static TreeTableCell getTreeTableCell(TreeTableView t, int row, int column) {
TreeTableColumn col = (TreeTableColumn)t.getColumns().get(column);
return findTheOnly(t, ".tree-table-cell", TreeTableCell.class, (n) -> {
if (n instanceof TreeTableCell c) {
if (n instanceof TreeTableCell) {
TreeTableCell c = (TreeTableCell)n;
if (row == c.getTableRow().getIndex()) {
if (col == c.getTableColumn()) {
return true;
Expand All @@ -124,7 +125,8 @@ public static TreeTableCell getTreeTableCell(TreeTableView t, int row, int colum
*/
public static TreeTableRow getTreeTableRow(TreeTableView t, int row) {
return findTheOnly(t, ".tree-table-row-cell", TreeTableRow.class, (n) -> {
if (n instanceof TreeTableRow c) {
if (n instanceof TreeTableRow) {
TreeTableRow c = (TreeTableRow)n;
if (row == c.getIndex()) {
return true;
}
Expand All @@ -140,7 +142,8 @@ public static TreeTableRow getTreeTableRow(TreeTableView t, int row) {
public static TableCell getTableCell(TableView t, int row, int column) {
TableColumn col = (TableColumn)t.getColumns().get(column);
return findTheOnly(t, ".table-cell", TableCell.class, (x) -> {
if (x instanceof TableCell c) {
if (x instanceof TableCell) {
TableCell c = (TableCell)x;
if (row == c.getTableRow().getIndex()) {
if (col == c.getTableColumn()) {
return true;
Expand All @@ -157,7 +160,8 @@ public static TableCell getTableCell(TableView t, int row, int column) {
*/
public static TableRow getTableRow(TableView t, int row) {
return findTheOnly(t, ".table-row-cell", TableRow.class, (x) -> {
if (x instanceof TableRow c) {
if (x instanceof TableRow) {
TableRow c = (TableRow)x;
if (row == c.getIndex()) {
return true;
}
Expand Down
Expand Up @@ -105,7 +105,8 @@ public void test_TableView_jdk_8187145() {
// toggling sorting ascending -> descending -> none
{
for (Object x: table.lookupAll(".table-column")) {
if (x instanceof TableColumnHeader n) {
if (x instanceof TableColumnHeader) {
TableColumnHeader n = (TableColumnHeader)x;
mouseClick(n);
assertEquals(1, table.getSortOrder().size());
table.sort();
Expand Down Expand Up @@ -179,7 +180,8 @@ public void test_TreeTableView_jdk_8187145() {
// toggling sorting ascending -> descending -> none
{
for (Object x: tree.lookupAll(".table-column")) {
if (x instanceof TableColumnHeader n) {
if (x instanceof TableColumnHeader) {
TableColumnHeader n = (TableColumnHeader)x;
mouseClick(n);
assertEquals(1, tree.getSortOrder().size());
tree.sort();
Expand Down

1 comment on commit 5ff6556

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.