Apache Commons logo Commons DBCP

SpotBugs Bug Detector Report

The following document contains the results of SpotBugs

SpotBugs Version is 4.3.0

Threshold is medium

Effort is default

Summary

Classes Bugs Errors Missing Classes
80 72 0 0

Files

Class Bugs
org.apache.commons.dbcp2.BasicDataSource 4
org.apache.commons.dbcp2.DelegatingConnection 2
org.apache.commons.dbcp2.DelegatingDatabaseMetaData 4
org.apache.commons.dbcp2.DelegatingResultSet 2
org.apache.commons.dbcp2.DelegatingStatement 4
org.apache.commons.dbcp2.DriverConnectionFactory 2
org.apache.commons.dbcp2.DriverManagerConnectionFactory 2
org.apache.commons.dbcp2.ListException 2
org.apache.commons.dbcp2.PoolableCallableStatement 1
org.apache.commons.dbcp2.PoolableConnection 3
org.apache.commons.dbcp2.PoolableConnectionFactory 9
org.apache.commons.dbcp2.PoolablePreparedStatement 1
org.apache.commons.dbcp2.PoolingConnection 2
org.apache.commons.dbcp2.PoolingDataSource 3
org.apache.commons.dbcp2.SQLExceptionList 2
org.apache.commons.dbcp2.Utils 1
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS 8
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource 6
org.apache.commons.dbcp2.datasources.UserPassKey 2
org.apache.commons.dbcp2.managed.BasicManagedDataSource 4
org.apache.commons.dbcp2.managed.LocalXAConnectionFactory$LocalXAResource 1
org.apache.commons.dbcp2.managed.ManagedConnection 2
org.apache.commons.dbcp2.managed.TransactionContext 3
org.apache.commons.dbcp2.managed.TransactionRegistry 2

org.apache.commons.dbcp2.BasicDataSource

Bug Category Details Line Priority
org.apache.commons.dbcp2.BasicDataSource.getDriverClassLoader() may expose internal representation by returning BasicDataSource.driverClassLoader MALICIOUS_CODE EI_EXPOSE_REP 899 Medium
org.apache.commons.dbcp2.BasicDataSource.setDriverClassLoader(ClassLoader) may expose internal representation by storing an externally mutable object into BasicDataSource.driverClassLoader MALICIOUS_CODE EI_EXPOSE_REP2 1900 Medium
org.apache.commons.dbcp2.BasicDataSource.setLogWriter(PrintWriter) may expose internal representation by storing an externally mutable object into BasicDataSource.logWriter MALICIOUS_CODE EI_EXPOSE_REP2 2056 Medium
Inconsistent synchronization of org.apache.commons.dbcp2.BasicDataSource.closed; locked 66% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 508 Medium

org.apache.commons.dbcp2.DelegatingConnection

Bug Category Details Line Priority
new org.apache.commons.dbcp2.DelegatingConnection(Connection) may expose internal representation by storing an externally mutable object into DelegatingConnection.connection MALICIOUS_CODE EI_EXPOSE_REP2 84 Medium
org.apache.commons.dbcp2.DelegatingConnection.setDelegate(Connection) may expose internal representation by storing an externally mutable object into DelegatingConnection.connection MALICIOUS_CODE EI_EXPOSE_REP2 881 Medium

org.apache.commons.dbcp2.DelegatingDatabaseMetaData

Bug Category Details Line Priority
org.apache.commons.dbcp2.DelegatingDatabaseMetaData.getConnection() may expose internal representation by returning DelegatingDatabaseMetaData.connection MALICIOUS_CODE EI_EXPOSE_REP 235 Medium
org.apache.commons.dbcp2.DelegatingDatabaseMetaData.getDelegate() may expose internal representation by returning DelegatingDatabaseMetaData.databaseMetaData MALICIOUS_CODE EI_EXPOSE_REP 307 Medium
new org.apache.commons.dbcp2.DelegatingDatabaseMetaData(DelegatingConnection, DatabaseMetaData) may expose internal representation by storing an externally mutable object into DelegatingDatabaseMetaData.connection MALICIOUS_CODE EI_EXPOSE_REP2 54 Medium
new org.apache.commons.dbcp2.DelegatingDatabaseMetaData(DelegatingConnection, DatabaseMetaData) may expose internal representation by storing an externally mutable object into DelegatingDatabaseMetaData.databaseMetaData MALICIOUS_CODE EI_EXPOSE_REP2 55 Medium

org.apache.commons.dbcp2.DelegatingResultSet

Bug Category Details Line Priority
org.apache.commons.dbcp2.DelegatingResultSet.getDelegate() may expose internal representation by returning DelegatingResultSet.resultSet MALICIOUS_CODE EI_EXPOSE_REP 521 Medium
org.apache.commons.dbcp2.DelegatingResultSet.getStatement() may expose internal representation by returning DelegatingResultSet.statement MALICIOUS_CODE EI_EXPOSE_REP 882 Medium

org.apache.commons.dbcp2.DelegatingStatement

Bug Category Details Line Priority
org.apache.commons.dbcp2.DelegatingStatement.getDelegate() may expose internal representation by returning DelegatingStatement.statement MALICIOUS_CODE EI_EXPOSE_REP 415 Medium
new org.apache.commons.dbcp2.DelegatingStatement(DelegatingConnection, Statement) may expose internal representation by storing an externally mutable object into DelegatingStatement.connection MALICIOUS_CODE EI_EXPOSE_REP2 60 Medium
new org.apache.commons.dbcp2.DelegatingStatement(DelegatingConnection, Statement) may expose internal representation by storing an externally mutable object into DelegatingStatement.statement MALICIOUS_CODE EI_EXPOSE_REP2 59 Medium
org.apache.commons.dbcp2.DelegatingStatement.setDelegate(Statement) may expose internal representation by storing an externally mutable object into DelegatingStatement.statement MALICIOUS_CODE EI_EXPOSE_REP2 715 Medium

org.apache.commons.dbcp2.DriverConnectionFactory

Bug Category Details Line Priority
org.apache.commons.dbcp2.DriverConnectionFactory.getProperties() may expose internal representation by returning DriverConnectionFactory.properties MALICIOUS_CODE EI_EXPOSE_REP 76 Medium
new org.apache.commons.dbcp2.DriverConnectionFactory(Driver, String, Properties) may expose internal representation by storing an externally mutable object into DriverConnectionFactory.properties MALICIOUS_CODE EI_EXPOSE_REP2 47 Medium

org.apache.commons.dbcp2.DriverManagerConnectionFactory

Bug Category Details Line Priority
org.apache.commons.dbcp2.DriverManagerConnectionFactory.getProperties() may expose internal representation by returning DriverManagerConnectionFactory.properties MALICIOUS_CODE EI_EXPOSE_REP 139 Medium
new org.apache.commons.dbcp2.DriverManagerConnectionFactory(String, Properties) may expose internal representation by storing an externally mutable object into DriverManagerConnectionFactory.properties MALICIOUS_CODE EI_EXPOSE_REP2 74 Medium

org.apache.commons.dbcp2.ListException

Bug Category Details Line Priority
org.apache.commons.dbcp2.ListException.getExceptionList() may expose internal representation by returning ListException.exceptionList MALICIOUS_CODE EI_EXPOSE_REP 54 Medium
new org.apache.commons.dbcp2.ListException(String, List) may expose internal representation by storing an externally mutable object into ListException.exceptionList MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium

org.apache.commons.dbcp2.PoolableCallableStatement

Bug Category Details Line Priority
new org.apache.commons.dbcp2.PoolableCallableStatement(CallableStatement, PStmtKey, KeyedObjectPool, DelegatingConnection) may expose internal representation by storing an externally mutable object into PoolableCallableStatement.pool MALICIOUS_CODE EI_EXPOSE_REP2 66 Medium

org.apache.commons.dbcp2.PoolableConnection

Bug Category Details Line Priority
org.apache.commons.dbcp2.PoolableConnection.getDisconnectionSqlCodes() may expose internal representation by returning PoolableConnection.disconnectionSqlCodes MALICIOUS_CODE EI_EXPOSE_REP 202 Medium
new org.apache.commons.dbcp2.PoolableConnection(Connection, ObjectPool, ObjectName, Collection, boolean) may expose internal representation by storing an externally mutable object into PoolableConnection.disconnectionSqlCodes MALICIOUS_CODE EI_EXPOSE_REP2 112 Medium
new org.apache.commons.dbcp2.PoolableConnection(Connection, ObjectPool, ObjectName, Collection, boolean) may expose internal representation by storing an externally mutable object into PoolableConnection.pool MALICIOUS_CODE EI_EXPOSE_REP2 110 Medium

org.apache.commons.dbcp2.PoolableConnectionFactory

Bug Category Details Line Priority
org.apache.commons.dbcp2.PoolableConnectionFactory.getConnectionInitSqls() may expose internal representation by returning PoolableConnectionFactory.connectionInitSqls MALICIOUS_CODE EI_EXPOSE_REP 184 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.getDataSourceJmxName() may expose internal representation by returning PoolableConnectionFactory.dataSourceJmxObjectName MALICIOUS_CODE EI_EXPOSE_REP 192 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.getDataSourceJmxObjectName() may expose internal representation by returning PoolableConnectionFactory.dataSourceJmxObjectName MALICIOUS_CODE EI_EXPOSE_REP 200 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.getDisconnectionSqlCodes() may expose internal representation by returning PoolableConnectionFactory.disconnectionSqlCodes MALICIOUS_CODE EI_EXPOSE_REP 275 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.getPool() may expose internal representation by returning PoolableConnectionFactory.pool MALICIOUS_CODE EI_EXPOSE_REP 295 Medium
new org.apache.commons.dbcp2.PoolableConnectionFactory(ConnectionFactory, ObjectName) may expose internal representation by storing an externally mutable object into PoolableConnectionFactory.dataSourceJmxObjectName MALICIOUS_CODE EI_EXPOSE_REP2 108 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.setConnectionInitSql(Collection) may expose internal representation by storing an externally mutable object into PoolableConnectionFactory.connectionInitSqls MALICIOUS_CODE EI_EXPOSE_REP2 487 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.setDisconnectionSqlCodes(Collection) may expose internal representation by storing an externally mutable object into PoolableConnectionFactory.disconnectionSqlCodes MALICIOUS_CODE EI_EXPOSE_REP2 551 Medium
org.apache.commons.dbcp2.PoolableConnectionFactory.setPool(ObjectPool) may expose internal representation by storing an externally mutable object into PoolableConnectionFactory.pool MALICIOUS_CODE EI_EXPOSE_REP2 616 Medium

org.apache.commons.dbcp2.PoolablePreparedStatement

Bug Category Details Line Priority
new org.apache.commons.dbcp2.PoolablePreparedStatement(PreparedStatement, Object, KeyedObjectPool, DelegatingConnection) may expose internal representation by storing an externally mutable object into PoolablePreparedStatement.pool MALICIOUS_CODE EI_EXPOSE_REP2 70 Medium

org.apache.commons.dbcp2.PoolingConnection

Bug Category Details Line Priority
org.apache.commons.dbcp2.PoolingConnection.getStatementPool() may expose internal representation by returning PoolingConnection.pstmtPool MALICIOUS_CODE EI_EXPOSE_REP 327 Medium
org.apache.commons.dbcp2.PoolingConnection.setStatementPool(KeyedObjectPool) may expose internal representation by storing an externally mutable object into PoolingConnection.pstmtPool MALICIOUS_CODE EI_EXPOSE_REP2 600 Medium

org.apache.commons.dbcp2.PoolingDataSource

Bug Category Details Line Priority
org.apache.commons.dbcp2.PoolingDataSource.getLogWriter() may expose internal representation by returning PoolingDataSource.logWriter MALICIOUS_CODE EI_EXPOSE_REP 191 Medium
new org.apache.commons.dbcp2.PoolingDataSource(ObjectPool) may expose internal representation by storing an externally mutable object into PoolingDataSource.pool MALICIOUS_CODE EI_EXPOSE_REP2 103 Medium
org.apache.commons.dbcp2.PoolingDataSource.setLogWriter(PrintWriter) may expose internal representation by storing an externally mutable object into PoolingDataSource.logWriter MALICIOUS_CODE EI_EXPOSE_REP2 246 Medium

org.apache.commons.dbcp2.SQLExceptionList

Bug Category Details Line Priority
org.apache.commons.dbcp2.SQLExceptionList.getCauseList() may expose internal representation by returning SQLExceptionList.causeList MALICIOUS_CODE EI_EXPOSE_REP 54 Medium
new org.apache.commons.dbcp2.SQLExceptionList(List) may expose internal representation by storing an externally mutable object into SQLExceptionList.causeList MALICIOUS_CODE EI_EXPOSE_REP2 45 Medium

org.apache.commons.dbcp2.Utils

Bug Category Details Line Priority
org.apache.commons.dbcp2.Utils.DISCONNECTION_SQL_CODES is a mutable collection which should be package protected MALICIOUS_CODE MS_MUTABLE_COLLECTION_PKGPROTECT 68 Medium

org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS

Bug Category Details Line Priority
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.getConnectionProperties() may expose internal representation by returning DriverAdapterCPDS.connectionProperties MALICIOUS_CODE EI_EXPOSE_REP 159 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.getDurationBetweenEvictionRuns() may expose internal representation by returning DriverAdapterCPDS.durationBetweenEvictionRuns MALICIOUS_CODE EI_EXPOSE_REP 191 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.getLogWriter() may expose internal representation by returning DriverAdapterCPDS.logWriter MALICIOUS_CODE EI_EXPOSE_REP 212 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.getMinEvictableIdleDuration() may expose internal representation by returning DriverAdapterCPDS.minEvictableIdleDuration MALICIOUS_CODE EI_EXPOSE_REP 244 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.setConnectionProperties(Properties) may expose internal representation by storing an externally mutable object into DriverAdapterCPDS.connectionProperties MALICIOUS_CODE EI_EXPOSE_REP2 555 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.setDurationBetweenEvictionRuns(Duration) may expose internal representation by storing an externally mutable object into DriverAdapterCPDS.durationBetweenEvictionRuns MALICIOUS_CODE EI_EXPOSE_REP2 603 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.setLogWriter(PrintWriter) may expose internal representation by storing an externally mutable object into DriverAdapterCPDS.logWriter MALICIOUS_CODE EI_EXPOSE_REP2 620 Medium
org.apache.commons.dbcp2.cpdsadapter.DriverAdapterCPDS.setMinEvictableIdleDuration(Duration) may expose internal representation by storing an externally mutable object into DriverAdapterCPDS.minEvictableIdleDuration MALICIOUS_CODE EI_EXPOSE_REP2 656 Medium

org.apache.commons.dbcp2.datasources.InstanceKeyDataSource

Bug Category Details Line Priority
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.getDefaultMaxWait() may expose internal representation by returning InstanceKeyDataSource.defaultMaxWaitDuration MALICIOUS_CODE EI_EXPOSE_REP 353 Medium
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.getLogWriter() may expose internal representation by returning InstanceKeyDataSource.logWriter MALICIOUS_CODE EI_EXPOSE_REP 525 Medium
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.getMaxConnLifetime() may expose internal representation by returning InstanceKeyDataSource.maxConnLifetimeMillis MALICIOUS_CODE EI_EXPOSE_REP 536 Medium
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.setDefaultMaxWait(Duration) may expose internal representation by storing an externally mutable object into InstanceKeyDataSource.defaultMaxWaitDuration MALICIOUS_CODE EI_EXPOSE_REP2 746 Medium
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.setLogWriter(PrintWriter) may expose internal representation by storing an externally mutable object into InstanceKeyDataSource.logWriter MALICIOUS_CODE EI_EXPOSE_REP2 974 Medium
org.apache.commons.dbcp2.datasources.InstanceKeyDataSource.setMaxConnLifetime(Duration) may expose internal representation by storing an externally mutable object into InstanceKeyDataSource.maxConnLifetimeMillis MALICIOUS_CODE EI_EXPOSE_REP2 994 Medium

org.apache.commons.dbcp2.datasources.UserPassKey

Bug Category Details Line Priority
Class org.apache.commons.dbcp2.datasources.UserPassKey defines non-transient non-serializable instance field name BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.apache.commons.dbcp2.datasources.UserPassKey defines non-transient non-serializable instance field password BAD_PRACTICE SE_BAD_FIELD Not available High

org.apache.commons.dbcp2.managed.BasicManagedDataSource

Bug Category Details Line Priority
org.apache.commons.dbcp2.managed.BasicManagedDataSource.getTransactionManager() may expose internal representation by returning BasicManagedDataSource.transactionManager MALICIOUS_CODE EI_EXPOSE_REP 167 Medium
org.apache.commons.dbcp2.managed.BasicManagedDataSource.getTransactionSynchronizationRegistry() may expose internal representation by returning BasicManagedDataSource.transactionSynchronizationRegistry MALICIOUS_CODE EI_EXPOSE_REP 186 Medium
org.apache.commons.dbcp2.managed.BasicManagedDataSource.setTransactionManager(TransactionManager) may expose internal representation by storing an externally mutable object into BasicManagedDataSource.transactionManager MALICIOUS_CODE EI_EXPOSE_REP2 214 Medium
org.apache.commons.dbcp2.managed.BasicManagedDataSource.setTransactionSynchronizationRegistry(TransactionSynchronizationRegistry) may expose internal representation by storing an externally mutable object into BasicManagedDataSource.transactionSynchronizationRegistry MALICIOUS_CODE EI_EXPOSE_REP2 226 Medium

org.apache.commons.dbcp2.managed.LocalXAConnectionFactory$LocalXAResource

Bug Category Details Line Priority
new org.apache.commons.dbcp2.managed.LocalXAConnectionFactory$LocalXAResource(Connection) may expose internal representation by storing an externally mutable object into LocalXAConnectionFactory$LocalXAResource.connection MALICIOUS_CODE EI_EXPOSE_REP2 68 Medium

org.apache.commons.dbcp2.managed.ManagedConnection

Bug Category Details Line Priority
org.apache.commons.dbcp2.managed.ManagedConnection.getTransactionContext() may expose internal representation by returning ManagedConnection.transactionContext MALICIOUS_CODE EI_EXPOSE_REP 156 Medium
new org.apache.commons.dbcp2.managed.ManagedConnection(ObjectPool, TransactionRegistry, boolean) may expose internal representation by storing an externally mutable object into ManagedConnection.pool MALICIOUS_CODE EI_EXPOSE_REP2 85 Medium

org.apache.commons.dbcp2.managed.TransactionContext

Bug Category Details Line Priority
org.apache.commons.dbcp2.managed.TransactionContext.getSharedConnection() may expose internal representation by returning TransactionContext.sharedConnection MALICIOUS_CODE EI_EXPOSE_REP 136 Medium
new org.apache.commons.dbcp2.managed.TransactionContext(TransactionRegistry, Transaction, TransactionSynchronizationRegistry) may expose internal representation by storing an externally mutable object into TransactionContext.transactionSynchronizationRegistry MALICIOUS_CODE EI_EXPOSE_REP2 77 Medium
org.apache.commons.dbcp2.managed.TransactionContext.setSharedConnection(Connection) may expose internal representation by storing an externally mutable object into TransactionContext.sharedConnection MALICIOUS_CODE EI_EXPOSE_REP2 209 Medium

org.apache.commons.dbcp2.managed.TransactionRegistry

Bug Category Details Line Priority
new org.apache.commons.dbcp2.managed.TransactionRegistry(TransactionManager, TransactionSynchronizationRegistry) may expose internal representation by storing an externally mutable object into TransactionRegistry.transactionManager MALICIOUS_CODE EI_EXPOSE_REP2 67 Medium
new org.apache.commons.dbcp2.managed.TransactionRegistry(TransactionManager, TransactionSynchronizationRegistry) may expose internal representation by storing an externally mutable object into TransactionRegistry.transactionSynchronizationRegistry MALICIOUS_CODE EI_EXPOSE_REP2 68 Medium