You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2018/06/20 14:41:41 UTC
commons-dbcp git commit: In-line local variable that is not needed.
Repository: commons-dbcp
Updated Branches:
refs/heads/master 1e067ed2d -> a78ebb040
In-line local variable that is not needed.
Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/a78ebb04
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/a78ebb04
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/a78ebb04
Branch: refs/heads/master
Commit: a78ebb040a841a14fa0ab8260977f9d2b92623a9
Parents: 1e067ed
Author: Gary Gregory <ga...@gmail.com>
Authored: Wed Jun 20 08:41:36 2018 -0600
Committer: Gary Gregory <ga...@gmail.com>
Committed: Wed Jun 20 08:41:36 2018 -0600
----------------------------------------------------------------------
.../java/org/apache/commons/dbcp2/PStmtKey.java | 34 +++++++-------------
1 file changed, 11 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/a78ebb04/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
index aba3acc..81ff896 100644
--- a/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
+++ b/src/main/java/org/apache/commons/dbcp2/PStmtKey.java
@@ -17,7 +17,6 @@
package org.apache.commons.dbcp2;
import java.sql.Connection;
-import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Arrays;
@@ -576,8 +575,7 @@ public class PStmtKey {
private class PreparedStatementSQL implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(sql);
- return statement;
+ return connection.prepareStatement(sql);
}
}
@@ -587,8 +585,7 @@ public class PStmtKey {
private class PreparedStatementWithAutoGeneratedKeys implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(sql, autoGeneratedKeys.intValue());
- return statement;
+ return connection.prepareStatement(sql, autoGeneratedKeys.intValue());
}
}
@@ -598,8 +595,7 @@ public class PStmtKey {
private class PreparedStatementWithColumnIndexes implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(sql, columnIndexes);
- return statement;
+ return connection.prepareStatement(sql, columnIndexes);
}
}
@@ -609,9 +605,7 @@ public class PStmtKey {
private class PreparedStatementWithResultSetConcurrency implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(sql, resultSetType.intValue(),
- resultSetConcurrency.intValue());
- return statement;
+ return connection.prepareStatement(sql, resultSetType.intValue(), resultSetConcurrency.intValue());
}
}
@@ -621,9 +615,8 @@ public class PStmtKey {
private class PreparedStatementWithResultSetHoldability implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(sql, resultSetType.intValue(),
- resultSetConcurrency.intValue(), resultSetHoldability.intValue());
- return statement;
+ return connection.prepareStatement(sql, resultSetType.intValue(), resultSetConcurrency.intValue(),
+ resultSetHoldability.intValue());
}
}
@@ -633,8 +626,7 @@ public class PStmtKey {
private class PreparedStatementWithColumnNames implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareStatement(sql, columnNames);
- return statement;
+ return connection.prepareStatement(sql, columnNames);
}
}
@@ -644,8 +636,7 @@ public class PStmtKey {
private class PreparedCallSQL implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareCall(sql);
- return statement;
+ return connection.prepareCall(sql);
}
}
@@ -655,9 +646,7 @@ public class PStmtKey {
private class PreparedCallWithResultSetConcurrency implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareCall(sql, resultSetType.intValue(),
- resultSetConcurrency.intValue());
- return statement;
+ return connection.prepareCall(sql, resultSetType.intValue(), resultSetConcurrency.intValue());
}
}
@@ -667,9 +656,8 @@ public class PStmtKey {
private class PreparedCallWithResultSetHoldability implements StatementBuilder {
@Override
public Statement createStatement(final Connection connection) throws SQLException {
- final PreparedStatement statement = connection.prepareCall(sql, resultSetType.intValue(),
- resultSetConcurrency.intValue(), resultSetHoldability.intValue());
- return statement;
+ return connection.prepareCall(sql, resultSetType.intValue(), resultSetConcurrency.intValue(),
+ resultSetHoldability.intValue());
}
}
}