changeset 9048:c1f6ed408492

8026176: Enhance document printing Reviewed-by: bae, jgodinez
author prr
date Mon, 14 Oct 2013 16:13:20 -0700
parents 62a8a26dca09
children 5cb70d52ae61
files src/share/classes/javax/print/SimpleDoc.java
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/javax/print/SimpleDoc.java	Sat Oct 12 20:46:35 2013 -0700
+++ b/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");
        }