openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From allee8...@apache.org
Subject svn commit: r780879 - /openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ConcreteClassGenerator.java
Date Mon, 01 Jun 2009 23:23:45 GMT
Author: allee8285
Date: Mon Jun  1 23:23:45 2009
New Revision: 780879

URL: http://svn.apache.org/viewvc?rev=780879&view=rev
Log:
OPENJPA-5 - Add doPriv around "new BCClassLoader" and "project.loadClass()"

Modified:
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ConcreteClassGenerator.java

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ConcreteClassGenerator.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ConcreteClassGenerator.java?rev=780879&r1=780878&r2=780879&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ConcreteClassGenerator.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/ConcreteClassGenerator.java
Mon Jun  1 23:23:45 2009
@@ -17,6 +17,7 @@
 
 import java.lang.reflect.Constructor;
 import java.lang.reflect.Modifier;
+import java.security.AccessController;
 
 import serp.bytecode.BCClass;
 import serp.bytecode.BCClassLoader;
@@ -51,11 +52,12 @@
             return abstractClass;
 
         Project project = new Project();
-        BCClassLoader loader = new BCClassLoader(project,
-            abstractClass.getClassLoader());
+        BCClassLoader loader = AccessController.doPrivileged(J2DoPrivHelper
+            .newBCClassLoaderAction(project, abstractClass.getClassLoader()));
 
         String name = abstractClass.getName()+"_";
-        BCClass bc = project.loadClass(name);
+        BCClass bc = AccessController.doPrivileged(J2DoPrivHelper.
+            loadProjectClassAction(project, name));
         
         bc.setSuperclass(abstractClass);
 



Mime
View raw message