This is an automated email from the ASF dual-hosted git repository. rmaucher pushed a commit to branch 11.0.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
commit 4d7a565296923dd6f304e6efe6b666b8affd31ec 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 8794de5ec0..1c8d355b90 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 @@ -111,8 +111,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; @@ -1632,7 +1632,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 * @@ -1659,7 +1659,6 @@ public class ConnectionPool { } boolean error = false; try { - // Connect and validate the connection con.lock(); con.connect(); if (isClosed()) { @@ -1717,7 +1716,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]
