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

rmaucher pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 6ebbe4037662964e874157d064f48ef2f816bdb4
Author: opencode <[email protected]>
AuthorDate: Thu Nov 5 22:24:45 2026 +0100

    Restore the RedundantModifier check for test code
    
    Re-enable RedundantModifier in res/checkstyle/test-checkstyle.xml. Two test 
classes contain public no-argument constructors on interceptor classes that the 
pool instantiates by class name, so the constructor has to stay public; make 
the enclosing test classes public so the constructors are not redundant. ant 
validate passes.
---
 .../org/apache/tomcat/jdbc/pool/TestThrowingDriverOnClaimedPaths.java   | 2 +-
 .../apache/tomcat/jdbc/pool/interceptor/TestInterceptorLifecycle.java   | 2 +-
 res/checkstyle/test-checkstyle.xml                                      | 1 +
 3 files changed, 3 insertions(+), 2 deletions(-)

diff --git 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestThrowingDriverOnClaimedPaths.java
 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestThrowingDriverOnClaimedPaths.java
index 28efc0eea2..1166d93046 100644
--- 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestThrowingDriverOnClaimedPaths.java
+++ 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/TestThrowingDriverOnClaimedPaths.java
@@ -60,7 +60,7 @@ import org.apache.tomcat.jdbc.JdbcPoolBaseTest;
  * returned, and the work - the close, the borrow, the sweep - reporting the
  * failure rather than being broken by it.
  */
-class TestThrowingDriverOnClaimedPaths extends JdbcPoolBaseTest {
+public class TestThrowingDriverOnClaimedPaths extends JdbcPoolBaseTest {
 
     /*
      * The physical method the connection should fail from with an Error, or
diff --git 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/TestInterceptorLifecycle.java
 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/TestInterceptorLifecycle.java
index a7fa322073..9d0fa2b710 100644
--- 
a/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/TestInterceptorLifecycle.java
+++ 
b/modules/jdbc-pool/src/test/java/org/apache/tomcat/jdbc/pool/interceptor/TestInterceptorLifecycle.java
@@ -45,7 +45,7 @@ import org.apache.tomcat.jdbc.pool.PooledConnection;
  * driver: the interceptor leaves evidence in the database work it sees and
  * in the statistics it publishes.</p>
  */
-class TestInterceptorLifecycle extends JdbcPoolBaseTest {
+public class TestInterceptorLifecycle extends JdbcPoolBaseTest {
 
     private static final String REPORT_SQL = "SELECT COUNT(*) FROM 
SYSTEM_RANGE(1,10)";
 
diff --git a/res/checkstyle/test-checkstyle.xml 
b/res/checkstyle/test-checkstyle.xml
index c9884730c3..a1ccab1689 100644
--- a/res/checkstyle/test-checkstyle.xml
+++ b/res/checkstyle/test-checkstyle.xml
@@ -92,6 +92,7 @@
 
     <!-- Modifiers -->
     <module name="ModifierOrder"/>
+    <module name="RedundantModifier"/>
 
     <!-- Whitespace -->
     <module name="GenericWhitespace"/>


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

Reply via email to