--- a/jdk/src/share/classes/javax/print/SimpleDoc.java Sat Oct 12 20:46:35 2013 -0700
+++ b/jdk/src/share/classes/javax/print/SimpleDoc.java Mon Oct 14 16:13:20 2013 -0700
@@ -91,7 +91,10 @@
Class repClass = null;
try {
- repClass = Class.forName(flavor.getRepresentationClassName());
+ String className = flavor.getRepresentationClassName();
+ sun.reflect.misc.ReflectUtil.checkPackageAccess(className);
+ repClass = Class.forName(className, false,
+ Thread.currentThread().getContextClassLoader());
} catch (Throwable e) {
throw new IllegalArgumentException("unknown representation class");
}