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

Tree/TableView with null focus model throws NPE in queryAccessibleAttribute()

    XMLWordPrintable

Details

    • b14

    Backports

      Description

        Calling TableView.queryAccessibleAttribute(AccessibleAttribute.FOCUS_ITEM); with a null focus model results in an NPE

        added to TableViewTest:
        ```
            @Ignore("JDK-8296413")
            @Test
            public void testQueryAccessibleAttributeFocusItemWithNullFocusModel() {
                table.getItems().addAll("1", "2");
                table.setFocusModel(null);

                stageLoader = new StageLoader(table);

                Object result = table.queryAccessibleAttribute(AccessibleAttribute.FOCUS_ITEM);

                assertNull(result);
            }
        ```

        ALSO
        - see if TreeTableView has the same issue
        - check whether other Controls throw exceptions from queryAccessibleAttribute(), trying all possible AccessibleAttribute values

        Attachments

          Issue Links

            Activity

              People

                angorya Andy Goryachev
                angorya Andy Goryachev
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: