You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by cs...@apache.org on 2017/04/18 12:55:08 UTC
[16/50] aries-jpa git commit: [ARIES-1615] Handle PreparedStatement
to avoid NPE
[ARIES-1615] Handle PreparedStatement to avoid NPE
git-svn-id: https://svn.apache.org/repos/asf/aries/trunk/jpa@1766695 13f79535-47bb-0310-9956-ffa450edef68
Project: http://git-wip-us.apache.org/repos/asf/aries-jpa/repo
Commit: http://git-wip-us.apache.org/repos/asf/aries-jpa/commit/b88bc890
Tree: http://git-wip-us.apache.org/repos/asf/aries-jpa/tree/b88bc890
Diff: http://git-wip-us.apache.org/repos/asf/aries-jpa/diff/b88bc890
Branch: refs/heads/master
Commit: b88bc890441decd52c759c8523189e97616ae116
Parents: 508754d
Author: cschneider <cs...@13f79535-47bb-0310-9956-ffa450edef68>
Authored: Wed Oct 26 16:11:47 2016 +0000
Committer: cschneider <cs...@13f79535-47bb-0310-9956-ffa450edef68>
Committed: Wed Oct 26 16:11:47 2016 +0000
----------------------------------------------------------------------
.../aries/jpa/container/weaving/impl/DummyDataSource.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/aries-jpa/blob/b88bc890/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
----------------------------------------------------------------------
diff --git a/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java b/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
index 6e5fa43..cac5635 100644
--- a/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
+++ b/jpa-container/src/main/java/org/apache/aries/jpa/container/weaving/impl/DummyDataSource.java
@@ -24,9 +24,11 @@ import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
+import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
+import java.sql.Statement;
import javax.sql.DataSource;
@@ -62,6 +64,9 @@ public final class DummyDataSource implements DataSource {
if (type == ResultSet.class) {
return createProxy(classLoader, ResultSet.class);
}
+ if (type == Statement.class) {
+ return createProxy(classLoader, PreparedStatement.class);
+ }
return null;
}