Repository: commons-dbcp
Updated Branches:
  refs/heads/master 6880e8030 -> 578127901


Use final.

Project: http://git-wip-us.apache.org/repos/asf/commons-dbcp/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-dbcp/commit/57812790
Tree: http://git-wip-us.apache.org/repos/asf/commons-dbcp/tree/57812790
Diff: http://git-wip-us.apache.org/repos/asf/commons-dbcp/diff/57812790

Branch: refs/heads/master
Commit: 578127901a96327d398a42ee524d9dedcea64dff
Parents: 6880e80
Author: Gary Gregory <garydgreg...@gmail.com>
Authored: Tue Nov 13 19:34:00 2018 -0700
Committer: Gary Gregory <garydgreg...@gmail.com>
Committed: Tue Nov 13 19:34:00 2018 -0700

----------------------------------------------------------------------
 .../commons/dbcp2/TestParallelCreationWithNoIdle.java   |  6 +++---
 .../dbcp2/managed/TestBasicManagedDataSource.java       | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/57812790/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java 
b/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
index 6d7367a..7e26c35 100644
--- a/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
+++ b/src/test/java/org/apache/commons/dbcp2/TestParallelCreationWithNoIdle.java
@@ -71,7 +71,7 @@ public class TestParallelCreationWithNoIdle  {
         ds.setInitialSize(8);
         final List<Throwable> errors = Collections.synchronizedList(new 
ArrayList<>());
 
-        Thread[] threads = new Thread[numThreads];
+        final Thread[] threads = new Thread[numThreads];
         for (int i = 0; i < numThreads; i++) {
             threads[i] = new TestThread(2, 0, 50);
             threads[i].setUncaughtExceptionHandler((t, e) -> errors.add(e));
@@ -119,7 +119,7 @@ public class TestParallelCreationWithNoIdle  {
                              "select 'literal', SYSDATE from dual");
                      ) {
                     System.out.println("Got Connection " + 
Thread.currentThread().toString());
-                    ResultSet rset = stmt.executeQuery();
+                    final ResultSet rset = stmt.executeQuery();
                     rset.next();
                     sleepMax(delayAfter);
                     rset.close();
@@ -131,7 +131,7 @@ public class TestParallelCreationWithNoIdle  {
             System.out.println("Thread done " + 
Thread.currentThread().toString());
         }
 
-        private void sleepMax(int timeMax) {
+        private void sleepMax(final int timeMax) {
             if (timeMax == 0) {
                 return;
             }

http://git-wip-us.apache.org/repos/asf/commons-dbcp/blob/57812790/src/test/java/org/apache/commons/dbcp2/managed/TestBasicManagedDataSource.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/commons/dbcp2/managed/TestBasicManagedDataSource.java
 
b/src/test/java/org/apache/commons/dbcp2/managed/TestBasicManagedDataSource.java
index 8293ef4..a26daa1 100644
--- 
a/src/test/java/org/apache/commons/dbcp2/managed/TestBasicManagedDataSource.java
+++ 
b/src/test/java/org/apache/commons/dbcp2/managed/TestBasicManagedDataSource.java
@@ -181,14 +181,14 @@ public class TestBasicManagedDataSource extends 
TestBasicDataSource {
     public void testTransactionSynchronizationRegistry() throws Exception {
         try (final BasicManagedDataSource basicManagedDataSource = new 
BasicManagedDataSource()) {
             basicManagedDataSource.setTransactionManager(new 
TransactionManagerImple());
-            TransactionSynchronizationRegistry tsr = new 
TransactionSynchronizationRegistryImple();
+            final TransactionSynchronizationRegistry tsr = new 
TransactionSynchronizationRegistryImple();
             basicManagedDataSource.setTransactionSynchronizationRegistry(tsr);
-            JdbcDataSource xaDataSource = new JdbcDataSource();
+            final JdbcDataSource xaDataSource = new JdbcDataSource();
             xaDataSource.setUrl("jdbc:h2:mem:test;DB_CLOSE_DELAY=-1");
             basicManagedDataSource.setXaDataSourceInstance(xaDataSource);
             basicManagedDataSource.setMaxIdle(1);
 
-            TransactionManager tm = 
basicManagedDataSource.getTransactionManager();
+            final TransactionManager tm = 
basicManagedDataSource.getTransactionManager();
             tm.begin();
             tsr.registerInterposedSynchronization(new Synchronization() {
                 @Override
@@ -197,13 +197,13 @@ public class TestBasicManagedDataSource extends 
TestBasicDataSource {
                     try {
                         connection = basicManagedDataSource.getConnection();
                         assertNotNull(connection);
-                    } catch (SQLException e) {
+                    } catch (final SQLException e) {
                         fail(e.getMessage());
                     } finally {
                         if (connection != null) {
                             try {
                                 connection.close();
-                            } catch (SQLException e) {
+                            } catch (final SQLException e) {
                                 fail(e.getMessage());
                             }
                         }
@@ -211,7 +211,7 @@ public class TestBasicManagedDataSource extends 
TestBasicDataSource {
                 }
 
                 @Override
-                public void afterCompletion(int i) {
+                public void afterCompletion(final int i) {
 
                 }
             });

Reply via email to