mattrpav commented on code in PR #1564:
URL: https://github.com/apache/activemq/pull/1564#discussion_r2627394720


##########
activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/PooledConnectionSecurityExceptionTest.java:
##########
@@ -134,8 +134,12 @@ public void testFailureGetsNewConnectionOnRetry() throws 
Exception {
 
             @Override
             public boolean isSatisified() throws Exception {
-                return connection1.getConnection() !=
-                    ((PooledConnection) 
pooledConnFact.createConnection("invalid", "credentials")).getConnection();
+                PooledConnection newConnection = (PooledConnection) 
pooledConnFact.createConnection("invalid", "credentials");

Review Comment:
   How about try-with-resources here?



##########
activemq-jms-pool/src/test/java/org/apache/activemq/jms/pool/PooledConnectionSecurityExceptionTest.java:
##########
@@ -232,8 +236,12 @@ public void testFailoverWithInvalidCredentials() throws 
Exception {
 
             @Override
             public boolean isSatisified() throws Exception {
-                return connection1.getConnection() !=
-                          ((PooledConnection) 
pooledConnFact.createConnection("invalid", "credentials")).getConnection();
+                PooledConnection newConnection = (PooledConnection) 
pooledConnFact.createConnection("invalid", "credentials");

Review Comment:
   same.. t-w-r here?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to