openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mik...@apache.org
Subject svn commit: r649221 - in /openjpa/trunk: openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java
Date Thu, 17 Apr 2008 18:41:28 GMT
Author: mikedd
Date: Thu Apr 17 11:41:25 2008
New Revision: 649221

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

Modified:
    openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
    openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java

Modified: openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java?rev=649221&r1=649220&r2=649221&view=diff
==============================================================================
--- openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
(original)
+++ openjpa/trunk/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/sql/OracleDictionary.java
Thu Apr 17 11:41:25 2008
@@ -20,6 +20,7 @@
 
 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.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 @@
             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 @@
             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) {

Modified: openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java?rev=649221&r1=649220&r2=649221&view=diff
==============================================================================
--- openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java
(original)
+++ openjpa/trunk/openjpa-lib/src/main/java/org/apache/openjpa/lib/util/J2DoPrivHelper.java
Thu Apr 17 11:41:25 2008
@@ -781,9 +781,9 @@
      *   
      * @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();
             }
         };



Mime
View raw message