This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 10.1.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit acd83863de21f168b47ae27dc0431d6b4eb5e653 Author: opencode <[email protected]> AuthorDate: Thu Nov 5 12:17:02 2026 +0100 Clarify ConnectionPool queue and parameter docs Replace the historical blocking-queue TODO on the busy field with the actual bound on its membership, describe the retained notUsed parameter as an API compatibility placeholder, and drop two comments that only restated the adjacent code. No behavior change. --- .../src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java index 0246f238fc..1d0658e995 100644 --- a/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java +++ b/modules/jdbc-pool/src/main/java/org/apache/tomcat/jdbc/pool/ConnectionPool.java @@ -113,8 +113,8 @@ public class ConnectionPool { private PoolConfiguration poolProperties; /** - * Contains all the connections that are in use TODO - this shouldn't be a blocking queue, simply a list to hold our - * objects + * Contains all the connections that are in use. Unbounded: membership is bounded by the maxActive/size + * bookkeeping, not by the queue capacity. */ private BlockingQueue<PooledConnection> busy; @@ -1634,7 +1634,7 @@ public class ConnectionPool { /** * Creates a JDBC connection and tries to connect to the database. * - * @param notUsed Argument not used + * @param notUsed Not used; retained for API compatibility * @param username The user name to use for the connection * @param password The password for the connection * @@ -1661,7 +1661,6 @@ public class ConnectionPool { } boolean error = false; try { - // Connect and validate the connection con.lock(); con.connect(); if (isClosed()) { @@ -1719,7 +1718,6 @@ public class ConnectionPool { throw ex; } } finally { - // con can never be null here if (error) { release(con); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
