< prev index next >

src/java.desktop/share/classes/javax/swing/JEditorPane.java

Print this page

        

@@ -1195,11 +1195,13 @@
                 } else {
                     // Will only happen if developer has invoked
                     // registerEditorKitForContentType(type, class, null).
                     c = SwingUtilities.loadSystemClass(classname);
                 }
-                k = (EditorKit) c.newInstance();
+                @SuppressWarnings("deprecation")
+                Object tmp = c.newInstance();
+                k = (EditorKit) tmp;
                 kitRegistry.put(type, k);
             } catch (Throwable e) {
                 k = null;
             }
         }
< prev index next >