From b2f914bd151b94b2ae50a6a42129ac9904ebd9a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E9=93=81?= Date: Sat, 19 Oct 2019 19:30:46 +0800 Subject: [PATCH] support JDK 1.7 features --- .../com/alibaba/druid/pool/DruidPooledCallableStatement.java | 4 ++-- .../java/com/alibaba/druid/pool/DruidPooledStatement.java | 4 ++-- .../alibaba/druid/proxy/jdbc/CallableStatementProxyImpl.java | 4 ++-- .../java/com/alibaba/druid/proxy/jdbc/StatementProxyImpl.java | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/alibaba/druid/pool/DruidPooledCallableStatement.java b/src/main/java/com/alibaba/druid/pool/DruidPooledCallableStatement.java index ed181235ec..d3ec2f51ab 100644 --- a/src/main/java/com/alibaba/druid/pool/DruidPooledCallableStatement.java +++ b/src/main/java/com/alibaba/druid/pool/DruidPooledCallableStatement.java @@ -1068,11 +1068,11 @@ public class DruidPooledCallableStatement extends DruidPooledPreparedStatement i } public T getObject(int parameterIndex, Class type) throws SQLException { - throw new SQLFeatureNotSupportedException(); + return stmt.getObject(parameterIndex, type); } public T getObject(String parameterName, Class type) throws SQLException { - throw new SQLFeatureNotSupportedException(); + return stmt.getObject(parameterName, type); } @SuppressWarnings("unchecked") diff --git a/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java b/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java index d2b3417064..d32b2e122c 100644 --- a/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java +++ b/src/main/java/com/alibaba/druid/pool/DruidPooledStatement.java @@ -879,10 +879,10 @@ public class DruidPooledStatement extends PoolableWrapper implements Statement { } public void closeOnCompletion() throws SQLException { - throw new SQLFeatureNotSupportedException(); + stmt.closeOnCompletion(); } public boolean isCloseOnCompletion() throws SQLException { - throw new SQLFeatureNotSupportedException(); + stmt.isCloseOnCompletion(); } } diff --git a/src/main/java/com/alibaba/druid/proxy/jdbc/CallableStatementProxyImpl.java b/src/main/java/com/alibaba/druid/proxy/jdbc/CallableStatementProxyImpl.java index 1f7dc00e74..51fd625cc4 100644 --- a/src/main/java/com/alibaba/druid/proxy/jdbc/CallableStatementProxyImpl.java +++ b/src/main/java/com/alibaba/druid/proxy/jdbc/CallableStatementProxyImpl.java @@ -603,11 +603,11 @@ public class CallableStatementProxyImpl extends PreparedStatementProxyImpl imple } public T getObject(int parameterIndex, Class type) throws SQLException { - throw new SQLFeatureNotSupportedException(); + return statement.getObject(parameterIndex, type); } public T getObject(String parameterName, Class type) throws SQLException { - throw new SQLFeatureNotSupportedException(); + return statement.getObject(parameterName, type); } @SuppressWarnings("unchecked") diff --git a/src/main/java/com/alibaba/druid/proxy/jdbc/StatementProxyImpl.java b/src/main/java/com/alibaba/druid/proxy/jdbc/StatementProxyImpl.java index e4db5b1e86..726d00bfbf 100644 --- a/src/main/java/com/alibaba/druid/proxy/jdbc/StatementProxyImpl.java +++ b/src/main/java/com/alibaba/druid/proxy/jdbc/StatementProxyImpl.java @@ -503,11 +503,11 @@ public class StatementProxyImpl extends WrapperProxyImpl implements StatementPro } public void closeOnCompletion() throws SQLException { - throw new SQLFeatureNotSupportedException(); + statement.closeOnCompletion(); } public boolean isCloseOnCompletion() throws SQLException { - throw new SQLFeatureNotSupportedException(); + statement.isCloseOnCompletion(); } @Override