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 2019/08/08 13:24:38 UTC
[commons-dbcp] branch master updated: Better local var names.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-dbcp.git
The following commit(s) were added to refs/heads/master by this push:
new 4813b7f Better local var names.
4813b7f is described below
commit 4813b7f5456c1f4fecc4f701ac731a71f57db249
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Aug 8 09:24:33 2019 -0400
Better local var names.
---
.../java/org/apache/commons/dbcp2/DelegatingConnection.java | 10 +++++-----
.../java/org/apache/commons/dbcp2/DelegatingStatement.java | 10 +++++-----
.../org/apache/commons/dbcp2/PoolableCallableStatement.java | 8 ++++----
.../org/apache/commons/dbcp2/PoolablePreparedStatement.java | 8 ++++----
4 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
index a5518c3..f005b21 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingConnection.java
@@ -622,7 +622,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i
// DBCP-288. Not all the traced objects will be statements
final List<AbandonedTrace> traces = getTrace();
if (traces != null && !traces.isEmpty()) {
- final List<Exception> thrown = new ArrayList<>();
+ final List<Exception> thrownList = new ArrayList<>();
final Iterator<AbandonedTrace> traceIter = traces.iterator();
while (traceIter.hasNext()) {
final Object trace = traceIter.next();
@@ -630,7 +630,7 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i
try {
((Statement) trace).close();
} catch (Exception e) {
- thrown.add(e);
+ thrownList.add(e);
}
} else if (trace instanceof ResultSet) {
// DBCP-265: Need to close the result sets that are
@@ -638,13 +638,13 @@ public class DelegatingConnection<C extends Connection> extends AbandonedTrace i
try {
((ResultSet) trace).close();
} catch (Exception e) {
- thrown.add(e);
+ thrownList.add(e);
}
}
}
clearTrace();
- if (!thrown.isEmpty()) {
- throw new SQLExceptionList(thrown);
+ if (!thrownList.isEmpty()) {
+ throw new SQLExceptionList(thrownList);
}
}
setLastUsed(0);
diff --git a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
index e806fab..95253e5 100644
--- a/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/DelegatingStatement.java
@@ -126,7 +126,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
if (isClosed()) {
return;
}
- final List<Exception> thrown = new ArrayList<>();
+ final List<Exception> thrownList = new ArrayList<>();
try {
if (connection != null) {
connection.removeTrace(this);
@@ -150,7 +150,7 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
// Does not rethrow e.
connection.handleExceptionNoThrow(e);
}
- thrown.add(e);
+ thrownList.add(e);
}
}
}
@@ -164,14 +164,14 @@ public class DelegatingStatement extends AbandonedTrace implements Statement {
// Does not rethrow e.
connection.handleExceptionNoThrow(e);
}
- thrown.add(e);
+ thrownList.add(e);
}
}
} finally {
closed = true;
statement = null;
- if (!thrown.isEmpty()) {
- throw new SQLExceptionList(thrown);
+ if (!thrownList.isEmpty()) {
+ throw new SQLExceptionList(thrownList);
}
}
}
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
index 8efcefd..c161f3b 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolableCallableStatement.java
@@ -122,20 +122,20 @@ public class PoolableCallableStatement extends DelegatingCallableStatement {
// See DBCP-10 for what could happen when ResultSets are closed twice.
final List<AbandonedTrace> resultSetList = getTrace();
if (resultSetList != null) {
- final List<Exception> thrown = new ArrayList<>();
+ final List<Exception> thrownList = new ArrayList<>();
final ResultSet[] resultSets = resultSetList.toArray(new ResultSet[resultSetList.size()]);
for (final ResultSet resultSet : resultSets) {
if (resultSet != null) {
try {
resultSet.close();
} catch (Exception e) {
- thrown.add(e);
+ thrownList.add(e);
}
}
}
clearTrace();
- if (!thrown.isEmpty()) {
- throw new SQLExceptionList(thrown);
+ if (!thrownList.isEmpty()) {
+ throw new SQLExceptionList(thrownList);
}
}
diff --git a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
index 7dbbe49..23c8c6b 100644
--- a/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
+++ b/src/main/java/org/apache/commons/dbcp2/PoolablePreparedStatement.java
@@ -137,20 +137,20 @@ public class PoolablePreparedStatement<K> extends DelegatingPreparedStatement {
// See bug 17301 for what could happen when ResultSets are closed twice.
final List<AbandonedTrace> resultSetList = getTrace();
if (resultSetList != null) {
- final List<Exception> thrown = new ArrayList<>();
+ final List<Exception> thrownList = new ArrayList<>();
final ResultSet[] resultSets = resultSetList.toArray(new ResultSet[resultSetList.size()]);
for (final ResultSet resultSet : resultSets) {
if (resultSet != null) {
try {
resultSet.close();
} catch (Exception e) {
- thrown.add(e);
+ thrownList.add(e);
}
}
}
clearTrace();
- if (!thrown.isEmpty()) {
- throw new SQLExceptionList(thrown);
+ if (!thrownList.isEmpty()) {
+ throw new SQLExceptionList(thrownList);
}
}