Apache Commons logo

Commons JCS™

FindBugs Bug Detector Report

The following document contains the results of FindBugs Report

FindBugs Version is 1.3.9

Threshold is medium

Effort is min

Summary

Classes Bugs Errors Missing Classes
319 68 0 0

Files

Class Bugs
org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCache 1
org.apache.commons.jcs.auxiliary.disk.block.BlockDiskElementDescriptor 2
org.apache.commons.jcs.auxiliary.disk.block.BlockDiskKeyStore 1
org.apache.commons.jcs.auxiliary.disk.file.FileDiskCache 1
org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache 1
org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCache 4
org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheManagerAbstractTemplate 3
org.apache.commons.jcs.auxiliary.disk.jdbc.hsql.HSQLDiskCacheFactory 1
org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLTableOptimizer 3
org.apache.commons.jcs.auxiliary.lateral.LateralCacheInfo 2
org.apache.commons.jcs.auxiliary.lateral.LateralCacheMonitor 1
org.apache.commons.jcs.auxiliary.lateral.LateralCacheNoWaitFacade 1
org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager 2
org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPListener 2
org.apache.commons.jcs.auxiliary.remote.AbstractRemoteCacheNoWaitFacade 1
org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes 2
org.apache.commons.jcs.auxiliary.remote.RemoteCacheFailoverRunner 2
org.apache.commons.jcs.auxiliary.remote.RemoteCacheMonitor 1
org.apache.commons.jcs.auxiliary.remote.http.server.RemoteHttpCacheServlet 2
org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory 1
org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerInfo 1
org.apache.commons.jcs.engine.CacheElementSerialized 2
org.apache.commons.jcs.engine.CacheInfo 2
org.apache.commons.jcs.engine.ElementAttributes 1
org.apache.commons.jcs.engine.control.CompositeCache 3
org.apache.commons.jcs.engine.control.CompositeCacheConfigurator 1
org.apache.commons.jcs.engine.control.CompositeCacheManager 2
org.apache.commons.jcs.engine.control.event.ElementEventQueue 6
org.apache.commons.jcs.engine.stats.CacheStats 5
org.apache.commons.jcs.engine.stats.Stats 3
org.apache.commons.jcs.utils.access.JCSWorker 1
org.apache.commons.jcs.utils.discovery.UDPDiscoveryInfo 2
org.apache.commons.jcs.utils.discovery.UDPDiscoveryService 1
org.apache.commons.jcs.utils.key.KeyGeneratorUtil 2
org.apache.commons.jcs.utils.threadpool.ThreadPoolManager 2

org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCache

Bug Category Details Line Priority
new org.apache.commons.jcs.auxiliary.disk.block.BlockDiskCache(BlockDiskCacheAttributes, IElementSerializer) ignores exceptional return value of java.io.File.mkdirs() BAD_PRACTICE RV_RETURN_VALUE_IGNORED_BAD_PRACTICE 123 Medium

org.apache.commons.jcs.auxiliary.disk.block.BlockDiskElementDescriptor

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.disk.block.BlockDiskElementDescriptor.getBlocks() may expose internal representation by returning BlockDiskElementDescriptor.blocks MALICIOUS_CODE EI_EXPOSE_REP 78 Medium
org.apache.commons.jcs.auxiliary.disk.block.BlockDiskElementDescriptor.setBlocks(int[]) may expose internal representation by storing an externally mutable object into BlockDiskElementDescriptor.blocks MALICIOUS_CODE EI_EXPOSE_REP2 68 Medium

org.apache.commons.jcs.auxiliary.disk.block.BlockDiskKeyStore

Bug Category Details Line Priority
new org.apache.commons.jcs.auxiliary.disk.block.BlockDiskKeyStore(BlockDiskCacheAttributes, BlockDiskCache) ignores exceptional return value of java.io.File.mkdirs() BAD_PRACTICE RV_RETURN_VALUE_IGNORED_BAD_PRACTICE 89 Medium

org.apache.commons.jcs.auxiliary.disk.file.FileDiskCache

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.disk.file.FileDiskCache.processUpdate(ICacheElement) ignores exceptional return value of java.io.File.renameTo(File) BAD_PRACTICE RV_RETURN_VALUE_IGNORED_BAD_PRACTICE 411 Medium

org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.disk.indexed.IndexedDiskCache.reset() ignores exceptional return value of java.io.File.delete() BAD_PRACTICE RV_RETURN_VALUE_IGNORED_BAD_PRACTICE 971 Medium

org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCache

Bug Category Details Line Priority
Method org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCache.doesElementExist(ICacheElement) may fail to clean up java.sql.ResultSet EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 457 Medium
Method org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCache.insertRow(ICacheElement, Connection, byte[]) may fail to clean up java.sql.Statement EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 334 Medium
Method org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCache.updateRow(ICacheElement, Connection, byte[]) may fail to clean up java.sql.Statement EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 397 Medium
A prepared statement is generated from a nonconstant String at org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCache.updateRow(ICacheElement, Connection, byte[]) SECURITY SQL_PREPARED_STATEMENT_GENERATED_FROM_NONCONSTANT_STRING 397 Medium

org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheManagerAbstractTemplate

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheManagerAbstractTemplate.clients should be package protected MALICIOUS_CODE MS_PKGPROTECT Not available Medium
org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheManagerAbstractTemplate.caches isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 55 High
org.apache.commons.jcs.auxiliary.disk.jdbc.JDBCDiskCacheManagerAbstractTemplate.tableStates isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 62 High

org.apache.commons.jcs.auxiliary.disk.jdbc.hsql.HSQLDiskCacheFactory

Bug Category Details Line Priority
Method org.apache.commons.jcs.auxiliary.disk.jdbc.hsql.HSQLDiskCacheFactory.setupTABLE(Connection, String) passes a nonconstant String to an execute method on an SQL statement SECURITY SQL_NONCONSTANT_STRING_PASSED_TO_EXECUTE 194 Medium

org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLTableOptimizer

Bug Category Details Line Priority
Method org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLTableOptimizer.getTableStatus(Statement) may fail to clean up java.sql.ResultSet EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 250 Medium
Method org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLTableOptimizer.optimizeTable() may fail to clean up java.sql.ResultSet EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 156 Medium
Method org.apache.commons.jcs.auxiliary.disk.jdbc.mysql.MySQLTableOptimizer.repairTable(Statement) may fail to clean up java.sql.ResultSet EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 281 Medium

org.apache.commons.jcs.auxiliary.lateral.LateralCacheInfo

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.lateral.LateralCacheInfo.vmid isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 44 High
org.apache.commons.jcs.auxiliary.lateral.LateralCacheInfo.listenerId isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 47 Medium

org.apache.commons.jcs.auxiliary.lateral.LateralCacheMonitor

Bug Category Details Line Priority
Naked notify in org.apache.commons.jcs.auxiliary.lateral.LateralCacheMonitor.notifyError() MT_CORRECTNESS NN_NAKED_NOTIFY 105 Medium

org.apache.commons.jcs.auxiliary.lateral.LateralCacheNoWaitFacade

Bug Category Details Line Priority
new org.apache.commons.jcs.auxiliary.lateral.LateralCacheNoWaitFacade(ILateralCacheListener, LateralCacheNoWait[], ILateralCacheAttributes) may expose internal representation by storing an externally mutable object into LateralCacheNoWaitFacade.noWaits MALICIOUS_CODE EI_EXPOSE_REP2 89 Medium

org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager

Bug Category Details Line Priority
Synchronization performed on java.util.concurrent.ConcurrentHashMap in org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager.getInstance(ITCPLateralCacheAttributes, ICompositeCacheManager, ICacheEventLogger, IElementSerializer) MT_CORRECTNESS JLM_JSR166_UTILCONCURRENT_MONITORENTER 105 Medium
org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPCacheManager.instances isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 69 High

org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPListener

Bug Category Details Line Priority
Class org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPListener defines non-transient non-serializable instance field receiver BAD_PRACTICE SE_BAD_FIELD Not available High
Class org.apache.commons.jcs.auxiliary.lateral.socket.tcp.LateralTCPListener defines non-transient non-serializable instance field pooledExecutor BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.apache.commons.jcs.auxiliary.remote.AbstractRemoteCacheNoWaitFacade

Bug Category Details Line Priority
new org.apache.commons.jcs.auxiliary.remote.AbstractRemoteCacheNoWaitFacade(RemoteCacheNoWait[], RemoteCacheAttributes, ICompositeCacheManager, ICacheEventLogger, IElementSerializer) may expose internal representation by storing an externally mutable object into AbstractRemoteCacheNoWaitFacade.noWaits MALICIOUS_CODE EI_EXPOSE_REP2 87 Medium

org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes.getFailovers() may expose internal representation by returning RemoteCacheAttributes.failovers MALICIOUS_CODE EI_EXPOSE_REP 98 Medium
org.apache.commons.jcs.auxiliary.remote.RemoteCacheAttributes.setFailovers(String[]) may expose internal representation by storing an externally mutable object into RemoteCacheAttributes.failovers MALICIOUS_CODE EI_EXPOSE_REP2 108 Medium

org.apache.commons.jcs.auxiliary.remote.RemoteCacheFailoverRunner

Bug Category Details Line Priority
Naked notify in org.apache.commons.jcs.auxiliary.remote.RemoteCacheFailoverRunner.notifyError() MT_CORRECTNESS NN_NAKED_NOTIFY 104 Medium
Exception is caught when Exception is not thrown in org.apache.commons.jcs.auxiliary.remote.RemoteCacheFailoverRunner.connectAndRestore() STYLE REC_CATCH_EXCEPTION 261 Medium

org.apache.commons.jcs.auxiliary.remote.RemoteCacheMonitor

Bug Category Details Line Priority
Naked notify in org.apache.commons.jcs.auxiliary.remote.RemoteCacheMonitor.notifyError() MT_CORRECTNESS NN_NAKED_NOTIFY 108 Medium

org.apache.commons.jcs.auxiliary.remote.http.server.RemoteHttpCacheServlet

Bug Category Details Line Priority
Class org.apache.commons.jcs.auxiliary.remote.http.server.RemoteHttpCacheServlet defines non-transient non-serializable instance field remoteHttpCacheServiceAdaptor BAD_PRACTICE SE_BAD_FIELD Not available Medium
Class org.apache.commons.jcs.auxiliary.remote.http.server.RemoteHttpCacheServlet defines non-transient non-serializable instance field serializer BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerFactory.shutdownImpl(String, int) calls Thread.sleep() with a lock held MT_CORRECTNESS SWL_SLEEP_WITH_LOCK_HELD 427 Medium

org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerInfo

Bug Category Details Line Priority
org.apache.commons.jcs.auxiliary.remote.server.RemoteCacheServerInfo.vmid isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 39 High

org.apache.commons.jcs.engine.CacheElementSerialized

Bug Category Details Line Priority
org.apache.commons.jcs.engine.CacheElementSerialized.getSerializedValue() may expose internal representation by returning CacheElementSerialized.serializedValue MALICIOUS_CODE EI_EXPOSE_REP 85 Medium
new org.apache.commons.jcs.engine.CacheElementSerialized(String, Serializable, byte[], IElementAttributes) may expose internal representation by storing an externally mutable object into CacheElementSerialized.serializedValue MALICIOUS_CODE EI_EXPOSE_REP2 62 Medium

org.apache.commons.jcs.engine.CacheInfo

Bug Category Details Line Priority
org.apache.commons.jcs.engine.CacheInfo.vmid isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 43 High
org.apache.commons.jcs.engine.CacheInfo.listenerId isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 46 Medium

org.apache.commons.jcs.engine.ElementAttributes

Bug Category Details Line Priority
Class org.apache.commons.jcs.engine.ElementAttributes implements Cloneable but does not define or use clone method BAD_PRACTICE CN_IDIOM 52-462 Medium

org.apache.commons.jcs.engine.control.CompositeCache

Bug Category Details Line Priority
org.apache.commons.jcs.engine.control.CompositeCache.getAuxCaches() may expose internal representation by returning CompositeCache.auxCaches MALICIOUS_CODE EI_EXPOSE_REP 172 Medium
org.apache.commons.jcs.engine.control.CompositeCache.setAuxCaches(AuxiliaryCache[]) may expose internal representation by storing an externally mutable object into CompositeCache.auxCaches MALICIOUS_CODE EI_EXPOSE_REP2 157 Medium
Class org.apache.commons.jcs.engine.control.CompositeCache defines non-transient non-serializable instance field auxCaches BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.apache.commons.jcs.engine.control.CompositeCacheConfigurator

Bug Category Details Line Priority
Method org.apache.commons.jcs.engine.control.CompositeCacheConfigurator.doConfigure(String) may fail to clean up java.io.InputStream EXPERIMENTAL OBL_UNSATISFIED_OBLIGATION 114 Medium

org.apache.commons.jcs.engine.control.CompositeCacheManager

Bug Category Details Line Priority
org.apache.commons.jcs.engine.control.CompositeCacheManager.instance should be package protected MALICIOUS_CODE MS_PKGPROTECT Not available Medium
Class org.apache.commons.jcs.engine.control.CompositeCacheManager defines non-transient non-serializable instance field scheduledExecutor BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.apache.commons.jcs.engine.control.event.ElementEventQueue

Bug Category Details Line Priority
new org.apache.commons.jcs.engine.control.event.ElementEventQueue(String) invokes Thread.start() MT_CORRECTNESS SC_START_IN_CTOR 82 Medium
Class org.apache.commons.jcs.engine.control.event.ElementEventQueue defines non-transient non-serializable instance field head BAD_PRACTICE SE_BAD_FIELD Not available Medium
Class org.apache.commons.jcs.engine.control.event.ElementEventQueue defines non-transient non-serializable instance field processorThread BAD_PRACTICE SE_BAD_FIELD Not available Medium
Class org.apache.commons.jcs.engine.control.event.ElementEventQueue defines non-transient non-serializable instance field tail BAD_PRACTICE SE_BAD_FIELD Not available Medium
org.apache.commons.jcs.engine.control.event.ElementEventQueue$QProcessor stored into non-transient field ElementEventQueue.processorThread BAD_PRACTICE SE_BAD_FIELD_STORE 81 Medium
org.apache.commons.jcs.engine.control.event.ElementEventQueue$QProcessor stored into non-transient field ElementEventQueue.processorThread BAD_PRACTICE SE_BAD_FIELD_STORE 220 Medium

org.apache.commons.jcs.engine.stats.CacheStats

Bug Category Details Line Priority
org.apache.commons.jcs.engine.stats.CacheStats.getAuxiliaryCacheStats() may expose internal representation by returning CacheStats.auxStats MALICIOUS_CODE EI_EXPOSE_REP 72 Medium
org.apache.commons.jcs.engine.stats.CacheStats.getStatElements() may expose internal representation by returning CacheStats.stats MALICIOUS_CODE EI_EXPOSE_REP 92 Medium
org.apache.commons.jcs.engine.stats.CacheStats.setAuxiliaryCacheStats(IStats[]) may expose internal representation by storing an externally mutable object into CacheStats.auxStats MALICIOUS_CODE EI_EXPOSE_REP2 80 Medium
org.apache.commons.jcs.engine.stats.CacheStats.setStatElements(IStatElement[]) may expose internal representation by storing an externally mutable object into CacheStats.stats MALICIOUS_CODE EI_EXPOSE_REP2 101 Medium
Class org.apache.commons.jcs.engine.stats.CacheStats defines non-transient non-serializable instance field stats BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.apache.commons.jcs.engine.stats.Stats

Bug Category Details Line Priority
org.apache.commons.jcs.engine.stats.Stats.getStatElements() may expose internal representation by returning Stats.stats MALICIOUS_CODE EI_EXPOSE_REP 45 Medium
org.apache.commons.jcs.engine.stats.Stats.setStatElements(IStatElement[]) may expose internal representation by storing an externally mutable object into Stats.stats MALICIOUS_CODE EI_EXPOSE_REP2 53 Medium
Class org.apache.commons.jcs.engine.stats.Stats defines non-transient non-serializable instance field stats BAD_PRACTICE SE_BAD_FIELD Not available Medium

org.apache.commons.jcs.utils.access.JCSWorker

Bug Category Details Line Priority
Wait not in loop in org.apache.commons.jcs.utils.access.JCSWorker.run(Serializable, String, JCSWorkerHelper) MT_CORRECTNESS WA_NOT_IN_LOOP 235 Medium

org.apache.commons.jcs.utils.discovery.UDPDiscoveryInfo

Bug Category Details Line Priority
org.apache.commons.jcs.utils.discovery.UDPDiscoveryInfo.vmid isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 34 High
org.apache.commons.jcs.utils.discovery.UDPDiscoveryInfo.listenerId isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 39 Medium

org.apache.commons.jcs.utils.discovery.UDPDiscoveryService

Bug Category Details Line Priority
new org.apache.commons.jcs.utils.discovery.UDPDiscoveryService(UDPDiscoveryAttributes, ICacheEventLogger) invokes Thread.start() MT_CORRECTNESS SC_START_IN_CTOR 103 Medium

org.apache.commons.jcs.utils.key.KeyGeneratorUtil

Bug Category Details Line Priority
org.apache.commons.jcs.utils.key.KeyGeneratorUtil.leadNumber should be package protected MALICIOUS_CODE MS_PKGPROTECT 66 Medium
org.apache.commons.jcs.utils.key.KeyGeneratorUtil.counterResetIntervalMillis isn't final but should be MALICIOUS_CODE MS_SHOULD_BE_FINAL 51 Medium

org.apache.commons.jcs.utils.threadpool.ThreadPoolManager

Bug Category Details Line Priority
Incorrect lazy initialization and update of static field org.apache.commons.jcs.utils.threadpool.ThreadPoolManager.props in org.apache.commons.jcs.utils.threadpool.ThreadPoolManager.configure() MT_CORRECTNESS LI_LAZY_INIT_UPDATE_STATIC 314-318 High
Write to static field org.apache.commons.jcs.utils.threadpool.ThreadPoolManager.defaultConfig from instance method org.apache.commons.jcs.utils.threadpool.ThreadPoolManager.configure() STYLE ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD 339 Medium