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

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


The following commit(s) were added to refs/heads/9.0.x by this push:
     new 82dda6b54a Silence Coverity warning
82dda6b54a is described below

commit 82dda6b54af48ed3a84cf99ec81ff44165eb55bb
Author: Mark Thomas <[email protected]>
AuthorDate: Wed Mar 11 22:14:00 2026 +0000

    Silence Coverity warning
    
    Not an issue since the caller is synchronized but protect access to the
    transactionRegistry for consistency.
---
 java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java 
b/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java
index a231dcad8e..57dc5bb96d 100644
--- a/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java
+++ b/java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java
@@ -107,7 +107,7 @@ public class BasicManagedDataSource extends BasicDataSource 
{
     }
 
     @Override
-    protected DataSource createDataSourceInstance() throws SQLException {
+    protected synchronized DataSource createDataSourceInstance() throws 
SQLException {
         final PoolingDataSource<PoolableConnection> pds = new 
ManagedDataSource<>(getConnectionPool(),
                 transactionRegistry);
         
pds.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());


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

Reply via email to