Skip to content

Commit 9861656

Browse files
committed
Silence Coverity warning
Not an issue since the caller is synchronized but protect access to the transactionRegistry for consistency.
1 parent aa968d8 commit 9861656

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

java/org/apache/tomcat/dbcp/dbcp2/managed/BasicManagedDataSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ protected synchronized ConnectionFactory createConnectionFactory() throws SQLExc
108108
}
109109

110110
@Override
111-
protected DataSource createDataSourceInstance() throws SQLException {
111+
protected synchronized DataSource createDataSourceInstance() throws SQLException {
112112
final PoolingDataSource<PoolableConnection> pds = new ManagedDataSource<>(getConnectionPool(),
113113
transactionRegistry);
114114
pds.setAccessToUnderlyingConnectionAllowed(isAccessToUnderlyingConnectionAllowed());

0 commit comments

Comments
 (0)