[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #99: DBCP-576 - Simplify and inline variables

2021-05-31 Thread GitBox


garydgregory commented on a change in pull request #99:
URL: https://github.com/apache/commons-dbcp/pull/99#discussion_r642586088



##
File path: 
src/test/java/org/apache/commons/dbcp2/datasources/TestSharedPoolDataSource.java
##
@@ -556,7 +554,7 @@ private void doTestPoolCallableStatements(final 
PrepareCallCallback callBack)
 conn.close();
 conn = null;
 
-conn = myDs.getConnection();
+conn = ((DataSource) spDs).getConnection();

Review comment:
   This is not clearer than what was before. I would not do this.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-dbcp] garydgregory commented on a change in pull request #99: DBCP-576 - Simplify and inline variables

2021-05-31 Thread GitBox


garydgregory commented on a change in pull request #99:
URL: https://github.com/apache/commons-dbcp/pull/99#discussion_r642541370



##
File path: 
src/test/java/org/apache/commons/dbcp2/managed/TestManagedDataSource.java
##
@@ -198,9 +198,8 @@ public void testManagedConnectionEqualsSameDelegate() 
throws Exception {
 @Test
 public void testManagedConnectionEqualsReflexive() throws Exception {
 final Connection con = ds.getConnection();
-final Connection con2 = con;

Review comment:
   Don't change there I think. See the title of the method. This makes it 
obvious.

##
File path: src/test/java/org/apache/commons/dbcp2/TestPoolingDataSource.java
##
@@ -101,9 +101,8 @@ public void 
testPoolGuardConnectionWrapperEqualsSameDelegate() throws Exception
 public void testPoolGuardConnectionWrapperEqualsReflexive()
 throws Exception {
 final Connection con = ds.getConnection();
-final Connection con2 = con;

Review comment:
   Don't change there I think. See the title of the method. This makes it 
obvious.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org