mirror of https://github.com/apache/openjpa.git
OPENJPA-388
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@580426 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6f43ce7d40
commit
a92418ddd6
|
@ -176,7 +176,10 @@ public class MappingToolTask
|
||||||
if (MappingTool.ACTION_IMPORT.equals(flags.action))
|
if (MappingTool.ACTION_IMPORT.equals(flags.action))
|
||||||
assertFiles(files);
|
assertFiles(files);
|
||||||
|
|
||||||
ClassLoader loader = getClassLoader();
|
ClassLoader loader =
|
||||||
|
(ClassLoader) AccessController.doPrivileged(J2DoPrivHelper
|
||||||
|
.newTemporaryClassLoaderAction(getClassLoader()));
|
||||||
|
|
||||||
if (flags.meta && MappingTool.ACTION_ADD.equals(flags.action))
|
if (flags.meta && MappingTool.ACTION_ADD.equals(flags.action))
|
||||||
flags.metaDataFile = Files.getFile(file, loader);
|
flags.metaDataFile = Files.getFile(file, loader);
|
||||||
else
|
else
|
||||||
|
@ -190,7 +193,7 @@ public class MappingToolTask
|
||||||
J2DoPrivHelper.getClassLoaderAction(MappingTool.class)));
|
J2DoPrivHelper.getClassLoaderAction(MappingTool.class)));
|
||||||
JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
|
JDBCConfiguration conf = (JDBCConfiguration) getConfiguration();
|
||||||
conf.setClassResolver(resolver);
|
conf.setClassResolver(resolver);
|
||||||
|
|
||||||
if (!MappingTool.run(conf, files, flags, loader))
|
if (!MappingTool.run(conf, files, flags, loader))
|
||||||
throw new BuildException(_loc.get("bad-conf", "MappingToolTask")
|
throw new BuildException(_loc.get("bad-conf", "MappingToolTask")
|
||||||
.getMessage());
|
.getMessage());
|
||||||
|
|
Loading…
Reference in New Issue