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

commit 12bce74582dcfb037f57adaf803bb40e9dd6e458
Author: Gary Gregory <[email protected]>
AuthorDate: Fri Nov 21 19:50:01 2025 +0000

    Sort members
---
 .../java/org/apache/commons/dbcp2/TesterStatement.java     | 14 +++++++-------
 .../apache/commons/dbcp2/datasources/CharArrayTest.java    | 14 +++++++-------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/test/java/org/apache/commons/dbcp2/TesterStatement.java 
b/src/test/java/org/apache/commons/dbcp2/TesterStatement.java
index e95aaad7..1cd41ef0 100644
--- a/src/test/java/org/apache/commons/dbcp2/TesterStatement.java
+++ b/src/test/java/org/apache/commons/dbcp2/TesterStatement.java
@@ -80,6 +80,13 @@ public class TesterStatement extends AbandonedTrace 
implements Statement {
         }
     }
 
+    protected void checkQueryTimeout() throws SQLTimeoutException {
+        if (queryTimeout > 0 && queryTimeout < 5) {
+            // Simulate timeout if queryTimout is set to less than 5 seconds
+            throw new SQLTimeoutException("query timeout " + queryTimeout);
+        }
+    }
+
     @Override
     public void clearBatch() throws SQLException {
         checkOpen();
@@ -404,11 +411,4 @@ public class TesterStatement extends AbandonedTrace 
implements Statement {
     public <T> T unwrap(final Class<T> iface) throws SQLException {
         throw new SQLException("Not implemented.");
     }
-
-    protected void checkQueryTimeout() throws SQLTimeoutException {
-        if (queryTimeout > 0 && queryTimeout < 5) {
-            // Simulate timeout if queryTimout is set to less than 5 seconds
-            throw new SQLTimeoutException("query timeout " + queryTimeout);
-        }
-    }
 }
diff --git 
a/src/test/java/org/apache/commons/dbcp2/datasources/CharArrayTest.java 
b/src/test/java/org/apache/commons/dbcp2/datasources/CharArrayTest.java
index b183595b..0db76c76 100644
--- a/src/test/java/org/apache/commons/dbcp2/datasources/CharArrayTest.java
+++ b/src/test/java/org/apache/commons/dbcp2/datasources/CharArrayTest.java
@@ -34,6 +34,13 @@ class CharArrayTest {
         assertEquals("foo", new CharArray("foo").asString());
     }
 
+    @Test
+    void testClear() {
+        assertNull(new CharArray((String) null).clear().get());
+        assertArrayEquals("".toCharArray(), new CharArray("").clear().get());
+        assertArrayEquals("\0\0\0".toCharArray(), new 
CharArray("foo").clear().get());
+    }
+
     @Test
     void testEquals() {
         assertEquals(new CharArray("foo"), new CharArray("foo"));
@@ -45,13 +52,6 @@ class CharArrayTest {
         assertArrayEquals("foo".toCharArray(), new CharArray("foo").get());
     }
 
-    @Test
-    void testClear() {
-        assertNull(new CharArray((String) null).clear().get());
-        assertArrayEquals("".toCharArray(), new CharArray("").clear().get());
-        assertArrayEquals("\0\0\0".toCharArray(), new 
CharArray("foo").clear().get());
-    }
-
     @Test
     void testHashCode() {
         assertEquals(new CharArray("foo").hashCode(), new 
CharArray("foo").hashCode());

Reply via email to