mirror of https://github.com/apache/openjpa.git
OPENJPA-542
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@649221 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
31c47a6c04
commit
fe45f77f03
|
@ -20,6 +20,7 @@ package org.apache.openjpa.jdbc.sql;
|
|||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Method;
|
||||
import java.security.AccessController;
|
||||
import java.sql.Blob;
|
||||
import java.sql.Clob;
|
||||
import java.sql.Connection;
|
||||
|
@ -45,9 +46,9 @@ import org.apache.openjpa.jdbc.schema.Index;
|
|||
import org.apache.openjpa.jdbc.schema.PrimaryKey;
|
||||
import org.apache.openjpa.jdbc.schema.Sequence;
|
||||
import org.apache.openjpa.jdbc.schema.Table;
|
||||
import org.apache.openjpa.jdbc.sql.Select;
|
||||
import org.apache.openjpa.lib.jdbc.DelegatingDatabaseMetaData;
|
||||
import org.apache.openjpa.lib.jdbc.DelegatingPreparedStatement;
|
||||
import org.apache.openjpa.lib.util.J2DoPrivHelper;
|
||||
import org.apache.openjpa.lib.util.Localizer;
|
||||
import org.apache.openjpa.util.StoreException;
|
||||
|
||||
|
@ -1002,7 +1003,8 @@ public class OracleDictionary
|
|||
return EMPTY_CLOB;
|
||||
try {
|
||||
return EMPTY_CLOB = (Clob) Class.forName("oracle.sql.CLOB",true,
|
||||
Thread.currentThread().getContextClassLoader()).
|
||||
AccessController.doPrivileged(J2DoPrivHelper
|
||||
.getContextClassLoaderAction())).
|
||||
getMethod("empty_lob", new Class[0]).
|
||||
invoke(null, new Object[0]);
|
||||
} catch (Exception e) {
|
||||
|
@ -1016,7 +1018,8 @@ public class OracleDictionary
|
|||
return EMPTY_BLOB;
|
||||
try {
|
||||
return EMPTY_BLOB = (Blob) Class.forName("oracle.sql.BLOB",true,
|
||||
Thread.currentThread().getContextClassLoader()).
|
||||
AccessController.doPrivileged(J2DoPrivHelper
|
||||
.getContextClassLoaderAction())).
|
||||
getMethod("empty_lob", new Class[0]).
|
||||
invoke(null, new Object[0]);
|
||||
} catch (Exception e) {
|
||||
|
|
|
@ -781,9 +781,9 @@ public abstract class J2DoPrivHelper {
|
|||
*
|
||||
* @return ClassLoader
|
||||
*/
|
||||
public static final PrivilegedAction getContextClassLoaderAction() {
|
||||
return new PrivilegedAction() {
|
||||
public Object run() {
|
||||
public static final PrivilegedAction<ClassLoader> getContextClassLoaderAction() {
|
||||
return new PrivilegedAction<ClassLoader>() {
|
||||
public ClassLoader run() {
|
||||
return Thread.currentThread().getContextClassLoader();
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue