mirror of
https://github.com/apache/openjpa.git
synced 2025-03-06 08:29:08 +00:00
OPENJPA-1895 add doPriv to setAccessible call.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1039246 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ae3f3af9db
commit
f4b14e18b7
@ -19,12 +19,14 @@
|
||||
package org.apache.openjpa.lib.jdbc;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.security.AccessController;
|
||||
import java.sql.Connection;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
|
||||
import org.apache.openjpa.lib.util.ConcreteClassGenerator;
|
||||
import org.apache.openjpa.lib.util.J2DoPrivHelper;
|
||||
|
||||
/**
|
||||
* Connection decorator that can configure some properties of the
|
||||
@ -46,7 +48,7 @@ public class ConfiguringConnectionDecorator implements ConnectionDecorator {
|
||||
try {
|
||||
configuringConnectionImpl = ConcreteClassGenerator.getConcreteConstructor(ConfiguringConnection.class,
|
||||
ConfiguringConnectionDecorator.class, Connection.class);
|
||||
configuringConnectionImpl.setAccessible(true);
|
||||
AccessController.doPrivileged(J2DoPrivHelper.setAccessibleAction(configuringConnectionImpl, true));
|
||||
} catch (Exception e) {
|
||||
throw new ExceptionInInitializerError(e);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user