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 2bcff69  Fix compiler warning.
2bcff69 is described below

commit 2bcff69258317a02a0d3581ccf48888f834dcab3
Author: Gary Gregory <gardgreg...@gmail.com>
AuthorDate: Fri Aug 20 16:16:38 2021 -0400

    Fix compiler warning.
---
 .../java/org/apache/commons/dbcp2/managed/TestTransactionContext.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/test/java/org/apache/commons/dbcp2/managed/TestTransactionContext.java 
b/src/test/java/org/apache/commons/dbcp2/managed/TestTransactionContext.java
index 7eefa2e..5a4881d 100644
--- a/src/test/java/org/apache/commons/dbcp2/managed/TestTransactionContext.java
+++ b/src/test/java/org/apache/commons/dbcp2/managed/TestTransactionContext.java
@@ -19,6 +19,7 @@ package org.apache.commons.dbcp2.managed;
 
 import static org.junit.jupiter.api.Assertions.assertThrows;
 
+import java.sql.Connection;
 import java.sql.SQLException;
 
 import javax.transaction.xa.XAResource;
@@ -57,7 +58,7 @@ public class TestTransactionContext {
             basicManagedDataSource.setUsername("userName");
             basicManagedDataSource.setPassword("password");
             basicManagedDataSource.setMaxIdle(1);
-            try (final ManagedConnection<?> conn = (ManagedConnection<?>) 
basicManagedDataSource.getConnection()) {
+            try (final ManagedConnection<?> conn = 
(ManagedConnection<Connection>) basicManagedDataSource.getConnection()) {
                 final UncooperativeTransaction transaction = new 
UncooperativeTransaction();
                 final TransactionContext transactionContext = new 
TransactionContext(basicManagedDataSource.getTransactionRegistry(), 
transaction);
                 assertThrows(SQLException.class, () -> 
transactionContext.setSharedConnection(conn));

Reply via email to