Better local var names.
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 @@
// 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 @@
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 @@
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 @@
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 @@
// Does not rethrow e.
connection.handleExceptionNoThrow(e);
}
- thrown.add(e);
+ thrownList.add(e);
}
}
}
@@ -164,14 +164,14 @@
// 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 @@
// 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 @@
// 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);
}
}