Index: src/test/api/java/common/javax/swing/JEditorPaneTest.java =================================================================== --- src/test/api/java/common/javax/swing/JEditorPaneTest.java (revision 490282) +++ src/test/api/java/common/javax/swing/JEditorPaneTest.java (working copy) @@ -787,4 +787,30 @@ .getEditorKitClassNameForContentType("text/rtf")); assertNull(JEditorPane.getEditorKitClassNameForContentType("...")); } + + public void testSetEditorKitForContentType() throws Exception { + try { + JEditorPane ep = new JEditorPane(); + ep.setEditorKitForContentType("abc", null); + fail("NPE expected"); + } catch (NullPointerException npe) { + // PASSED + } + + try { + JEditorPane ep = new JEditorPane(); + ep.setEditorKitForContentType(null, new DefaultEditorKit()); + fail("NPE expected"); + } catch (NullPointerException npe) { + // PASSED + } + + try { + JEditorPane ep = new JEditorPane(); + ep.setEditorKitForContentType(null, null); + fail("NPE expected"); + } catch (NullPointerException npe) { + // PASSED + } + } } \ No newline at end of file