This is an automated email from the ASF dual-hosted git repository.

markt-asf pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/11.0.x by this push:
     new 511533aad1 Fix IDE warnings
511533aad1 is described below

commit 511533aad1cb1f0f6921648503aed93069f78cfb
Author: Mark Thomas <[email protected]>
AuthorDate: Fri Nov 13 12:20:17 2026 +0000

    Fix IDE warnings
---
 .../org/apache/tomcat/jdbc/pool/TestBorrowReturnStatistics.java     | 2 +-
 .../java/org/apache/tomcat/jdbc/pool/jmx/TestJmxRegistration.java   | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestBorrowReturnStatistics.java
 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestBorrowReturnStatistics.java
index bb100a0b18..5f1b5a471e 100644
--- 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestBorrowReturnStatistics.java
+++ 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestBorrowReturnStatistics.java
@@ -203,7 +203,7 @@ class TestBorrowReturnStatistics extends JdbcPoolBaseTest {
         // The same connection serves a later successful borrow normally, and
         // that hand-off and its return are counted once each.
         ds.getPoolProperties().setJdbcInterceptors(null);
-        try (Connection borrowed = ds.getConnection()) {
+        try (@SuppressWarnings("unused") Connection borrowed = 
ds.getConnection()) {
             Assertions.assertEquals(1, pool.getBorrowedCount());
         }
         Assertions.assertEquals(1, pool.getReturnedCount());
diff --git 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/jmx/TestJmxRegistration.java
 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/jmx/TestJmxRegistration.java
index 6f17a641d7..6512d33efa 100644
--- 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/jmx/TestJmxRegistration.java
+++ 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/jmx/TestJmxRegistration.java
@@ -342,7 +342,7 @@ class TestJmxRegistration extends JdbcPoolBaseTest {
         try {
             server.registerMBean(jmx, direct);
             ObjectName connectionName;
-            try (Connection borrowed = ds.getConnection()) {
+            try (@SuppressWarnings("unused") Connection borrowed = 
ds.getConnection()) {
                 connectionName = connectionMBeanUnder(server, direct);
                 Assertions.assertNotNull(connectionName,
                         "precondition: the directly published pool has its 
connection MBean below it");
@@ -378,7 +378,7 @@ class TestJmxRegistration extends JdbcPoolBaseTest {
         try {
             server.registerMBean(jmx, direct);
             ObjectName connectionName;
-            try (Connection borrowed = ds.getConnection()) {
+            try (@SuppressWarnings("unused") Connection borrowed = 
ds.getConnection()) {
                 connectionName = connectionMBeanUnder(server, direct);
                 Assertions.assertNotNull(connectionName,
                         "precondition: the directly published pool has its 
connection MBean below it");
@@ -419,7 +419,7 @@ class TestJmxRegistration extends JdbcPoolBaseTest {
             // connects in that window publishes below it.
             jmx.preRegister(server, occupied);
             ObjectName connectionName;
-            try (Connection borrowed = ds.getConnection()) {
+            try (@SuppressWarnings("unused") Connection borrowed = 
ds.getConnection()) {
                 connectionName = connectionMBeanUnder(server, occupied);
                 Assertions.assertNotNull(connectionName,
                         "precondition: the child was published while the 
refused name was installed");


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to