8026176: Enhance document printing

Reviewed-by: bae, jgodinez
This commit is contained in:
Phil Race 2013-10-14 16:13:20 -07:00
parent f43f3d62c0
commit 52b9a4cd19

View File

@ -91,7 +91,10 @@ public final class SimpleDoc implements Doc {
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");
}