openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r580426 - /openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java
Date Fri, 28 Sep 2007 17:13:42 GMT
Author: mikedd
Date: Fri Sep 28 10:13:41 2007
New Revision: 580426

URL: http://svn.apache.org/viewvc?rev=580426&view=rev
Log:
OPENJPA-388

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java?rev=580426&r1=580425&r2=580426&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/ant/MappingToolTask.java
Fri Sep 28 10:13:41 2007
@@ -176,7 +176,10 @@
         if (MappingTool.ACTION_IMPORT.equals(flags.action))
             assertFiles(files);
 
-        ClassLoader loader = getClassLoader();
+        ClassLoader loader =
+            (ClassLoader) AccessController.doPrivileged(J2DoPrivHelper
+                    .newTemporaryClassLoaderAction(getClassLoader()));
+        
         if (flags.meta && MappingTool.ACTION_ADD.equals(flags.action))
             flags.metaDataFile = Files.getFile(file, loader);
         else
@@ -190,7 +193,7 @@
             J2DoPrivHelper.getClassLoaderAction(MappingTool.class)));
         JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
         conf.setClassResolver(resolver);
-
+        
         if (!MappingTool.run(conf, files, flags, loader))
             throw new BuildException(_loc.get("bad-conf", "MappingToolTask")
                 .getMessage());



Mime
View raw message