mirror of https://github.com/apache/openjpa.git
OPENJPA-2689 prevent IllegalArgumentException with package scoped OraclePreparedStatementWrapper classes
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@1784577 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
635dd436cf
commit
8567a5e5c2
|
@ -602,9 +602,13 @@ public class OracleDictionary
|
||||||
getInnermostDelegate();
|
getInnermostDelegate();
|
||||||
if (isOraclePreparedStatement(inner)) {
|
if (isOraclePreparedStatement(inner)) {
|
||||||
try {
|
try {
|
||||||
inner.getClass().getMethod("setFixedCHAR",
|
Method setFixedCharMethod = inner.getClass().getMethod("setFixedCHAR",
|
||||||
new Class[]{ int.class, String.class }).
|
new Class[]{int.class, String.class});
|
||||||
invoke(inner, new Object[]{ new Integer(idx), val });
|
if (!setFixedCharMethod.isAccessible()) {
|
||||||
|
setFixedCharMethod.setAccessible(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
setFixedCharMethod.invoke(inner, new Object[]{ new Integer(idx), val });
|
||||||
return;
|
return;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.warn(e);
|
log.warn(e);
|
||||||
|
|
Loading…
Reference in New Issue