This is an automated email from the ASF dual-hosted git repository.
markt-asf pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/10.1.x by this push:
new f8d7ecb310 Fix IDE warnings
f8d7ecb310 is described below
commit f8d7ecb310757bf2d3e8870d440603f7be5c61e9
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]