--- a/jdk/src/share/classes/javax/swing/JEditorPane.java Tue Jul 22 13:14:59 2014 +0400
+++ b/jdk/src/share/classes/javax/swing/JEditorPane.java Tue Jul 22 13:23:01 2014 +0400
@@ -39,6 +39,7 @@
import javax.swing.event.*;
import javax.swing.text.html.*;
import javax.accessibility.*;
+import sun.reflect.misc.ReflectUtil;
/**
* A text component to edit various kinds of content.
@@ -1193,12 +1194,12 @@
try {
Class<?> c;
if (loader != null) {
+ ReflectUtil.checkPackageAccess(classname);
c = loader.loadClass(classname);
} else {
// Will only happen if developer has invoked
// registerEditorKitForContentType(type, class, null).
- c = Class.forName(classname, true, Thread.currentThread().
- getContextClassLoader());
+ c = SwingUtilities.loadSystemClass(classname);
}
k = (EditorKit) c.newInstance();
kitRegistry.put(type, k);