Index: src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUITest.java =================================================================== --- src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUITest.java (revision 493699) +++ src/test/api/java/common/javax/swing/plaf/basic/BasicComboBoxUITest.java (working copy) @@ -29,6 +29,7 @@ import javax.swing.DefaultListCellRenderer; import javax.swing.JButton; import javax.swing.JComboBox; +import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; @@ -259,6 +260,23 @@ assertFalse(r1 == r2); } + // Regression test for HARMONY-2896 + public void testGetAccessibleChildrenCound() throws Exception { + ui.comboBox = null; + try { + ui.getAccessibleChildrenCount(new JComponent() {}); + fail("NullPointerException should have been thrown"); + } catch (NullPointerException e) { + // Expected + } + try { + ui.getAccessibleChildrenCount(null); + fail("NullPointerException should have been thrown"); + } catch (NullPointerException e) { + // Expected + } + } + public void testGetInsets() throws Exception { ui.comboBox = comboBox; assertEquals(comboBox.getInsets(), ui.getInsets());