Index: modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java =================================================================== --- modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java (revision 499345) +++ modules/swing/src/test/api/java/common/javax/swing/text/StyleConstantsTest.java (working copy) @@ -434,6 +434,16 @@ assertEquals(val, StyleConstants.getComponent(attr)); } + public void testGetComponent_Null() { + // Regression test for HARMONY-1767 + try { + StyleConstants.getComponent(null); + fail("NullPointerException should be thrown"); + } catch (NullPointerException e) { + // expected + } + } + public void testSetComponent() { attr.removeAttributes(attr); Component val = new JLabel("test component");