FindBugs Results

The following document contains the results of FindBugs.

Summary

Files Errors
29 74

Files

Files Violations
org.apache.torque.TorqueRuntimeException 2
org.apache.torque.TorqueInstance 1
org.apache.torque.om.StringKey 1
org.apache.torque.om.DateKey 1
org.apache.torque.om.ComboKey 2
org.apache.torque.om.ObjectKey 1
org.apache.torque.map.TableMap 3
org.apache.torque.oid.SequenceIdGenerator 1
org.apache.torque.oid.IDBroker 6
org.apache.torque.util.BasePeer 14
org.apache.torque.util.VillageUtils 2
java.util.ArrayList 1
org.apache.torque.util.SqlExpression 2
org.apache.torque.util.Criteria$Criterion 1
org.apache.torque.util.SQLBuilder 4
org.apache.torque.util.Criteria 7
org.apache.torque.util.LargeSelect 6
org.apache.torque.dsfactory.AbstractDataSourceFactory 1
org.apache.torque.dsfactory.PerUserPoolDataSourceFactory 2
org.apache.torque.dsfactory.JndiDataSourceFactory 2
org.apache.torque.dsfactory.SharedPoolDataSourceFactory 2
org.apache.torque.manager.AbstractBaseManager 3
org.apache.torque.manager.MethodCacheKey 2
org.apache.torque.adapter.DBCloudscape 1
org.apache.torque.oid.IDGeneratorFactory 1
org.apache.torque.util.LimitHelper 1
org.apache.torque.om.NumberKey 1
org.apache.torque.om.SimpleKey 2
org.apache.torque.map.DatabaseMap 1

org.apache.torque.TorqueRuntimeException

Violation Line
ITA: Method org.apache.torque.TorqueRuntimeException.splitStackTrace(String) uses Collection.toArray() with zero-length array argument 217
BC: Unchecked/unconfirmed cast from java.lang.Throwable to class org.apache.torque.TorqueException in org.apache.torque.TorqueRuntimeException.printStackTrace(java.io.PrintWriter,int) 157

org.apache.torque.TorqueInstance

Violation Line
REC: Method org.apache.torque.TorqueInstance.initDataSourceFactories(org.apache.commons.configuration.Configuration) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 316

org.apache.torque.om.StringKey

Violation Line
HE: org.apache.torque.om.StringKey defines equals but not hashCode 0

org.apache.torque.om.DateKey

Violation Line
HE: org.apache.torque.om.DateKey defines equals but not hashCode 0

org.apache.torque.om.ComboKey

Violation Line
EI2: org.apache.torque.om.ComboKey.setValue(SimpleKey[]) may expose internal representation by storing an externally mutable object into org.apache.torque.om.ComboKey.key 82
EI: org.apache.torque.om.ComboKey.getValue() may expose internal representation by returning org.apache.torque.om.ComboKey.key 159

org.apache.torque.om.ObjectKey

Violation Line
HE: org.apache.torque.om.ObjectKey defines hashCode and uses Object.equals() 0

org.apache.torque.map.TableMap

Violation Line
Dm: Method org.apache.torque.map.TableMap.removeUnderScores(String) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead 553
MS: org.apache.torque.map.TableMap.VALID_ID_METHODS should be package protected 0
CD: Class org.apache.torque.map.TableMap has a circular dependency with other classes. 0

org.apache.torque.oid.SequenceIdGenerator

Violation Line
RCN: Redundant nullcheck of value known to be non-null org.apache.torque.oid.SequenceIdGenerator.getIdAsVillageValue(java.sql.Connection,Object) 177

org.apache.torque.oid.IDBroker

Violation Line
DE: org.apache.torque.oid.IDBroker.<init>(org.apache.torque.map.TableMap) might ignore java.lang.Exception 228
SC: org.apache.torque.oid.IDBroker.<init>(org.apache.torque.map.TableMap) invokes java.lang.Thread.start() 204
NP: Possible null pointer dereference in org.apache.torque.oid.IDBroker.<init>(org.apache.torque.map.TableMap) on exception path 226
NP: Possible null pointer dereference in org.apache.torque.oid.IDBroker.exists(String) on exception path 479
NP: Possible null pointer dereference in org.apache.torque.oid.IDBroker.getQuantity(String,java.sql.Connection) on exception path 748
NP: Possible null pointer dereference in org.apache.torque.oid.IDBroker.getQuantity(String,java.sql.Connection) 748

org.apache.torque.util.BasePeer

Violation Line
Dm: Method org.apache.torque.util.BasePeer.initColumnNames(com.workingdogs.village.Column[]) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead 192
Dm: Method org.apache.torque.util.BasePeer.initCriteriaKeys(String,String[]) invokes dubious String.toUpperCase() or String.toLowerCase; use the Locale parameterized version instead 211
RCN: Redundant nullcheck of value known to be non-null org.apache.torque.util.BasePeer.doInsert(Criteria,java.sql.Connection) 497
DLS: Dead store to local variable in method org.apache.torque.util.BasePeer.doDelete(Criteria,java.sql.Connection) 335
DLS: Dead store to local variable in method org.apache.torque.util.BasePeer.executeQuery(String,int,int,boolean,java.sql.Connection) 883
DLS: Dead store to local variable in method org.apache.torque.util.BasePeer.doUpdate(Criteria,Criteria,java.sql.Connection) 1210
DLS: Dead store to local variable in method org.apache.torque.util.BasePeer.doUpdate(Criteria,Criteria,java.sql.Connection) 1211
DLS: Dead store to local variable in method org.apache.torque.util.BasePeer.executeStatement(String,String) 1262
DLS: Dead store to local variable in method org.apache.torque.util.BasePeer.executeStatement(String,java.sql.Connection) 1289
REC: Method org.apache.torque.util.BasePeer.doInsert(Criteria,java.sql.Connection) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 518
REC: Method org.apache.torque.util.BasePeer.executeQuery(String,int,int,boolean,java.sql.Connection) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 897
REC: Method org.apache.torque.util.BasePeer.getMapBuilder(String) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 1385
REC: Method org.apache.torque.util.BasePeer.doPSSelect(Criteria,java.sql.Connection) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 1447
MS: org.apache.torque.util.BasePeer.log isn't final but should be 0

org.apache.torque.util.VillageUtils

Violation Line
DE: org.apache.torque.util.VillageUtils.close(java.io.OutputStream) might ignore java.lang.Exception 99
WMI: Method org.apache.torque.util.VillageUtils.hashtableToByteArray(java.util.Hashtable) makes inefficient use of keySet iterator instead of entrySet iterator 124

java.util.ArrayList

Violation Line
Nm: The method name java.util.ArrayList.RangeCheck(int) doesn't start with an lower case letter 506

org.apache.torque.util.SqlExpression

Violation Line
Dm: org.apache.torque.util.SqlExpression.quoteAndEscapeText(String,org.apache.torque.adapter.DB) invokes dubious new String() constructor; just use "" 573
DLS: Dead store to local variable in method org.apache.torque.util.SqlExpression.quoteAndEscapeText(String,org.apache.torque.adapter.DB) 573

org.apache.torque.util.Criteria$Criterion

Violation Line
ITA: Method org.apache.torque.util.Criteria$Criterion.appendPsTo(StringBuffer,java.util.List) uses Collection.toArray() with zero-length array argument 3496

org.apache.torque.util.SQLBuilder

Violation Line
DLS: Dead store to local variable in method org.apache.torque.util.SQLBuilder.processCriterions(org.apache.torque.adapter.DB,org.apache.torque.map.DatabaseMap,String,Criteria,Query,java.util.List,SQLBuilder$QueryCallback) 407
WMI: Method org.apache.torque.util.SQLBuilder.processAsColumns(Criteria,Query) makes inefficient use of keySet iterator instead of entrySet iterator 363
MS: org.apache.torque.util.SQLBuilder.log isn't final but should be 0
CD: Class org.apache.torque.util.SQLBuilder has a circular dependency with other classes. 0

org.apache.torque.util.Criteria

Violation Line
DE: org.apache.torque.util.Criteria.toString() might ignore java.lang.Exception 1804
Dm: org.apache.torque.util.Criteria.add(String,boolean,SqlEnum) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead 1097
Dm: org.apache.torque.util.Criteria.and(String,boolean) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead 2108
Dm: org.apache.torque.util.Criteria.and(String,boolean,SqlEnum) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead 2129
Dm: org.apache.torque.util.Criteria.or(String,boolean) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead 2670
Dm: org.apache.torque.util.Criteria.or(String,boolean,SqlEnum) invokes dubious Boolean constructor; use Boolean.valueOf(...) instead 2691
WMI: Method org.apache.torque.util.Criteria.readObject(java.io.ObjectInputStream) makes inefficient use of keySet iterator instead of entrySet iterator 3095

org.apache.torque.util.LargeSelect

Violation Line
SnVI: org.apache.torque.util.LargeSelect is Serializable; consider declaring a serialVersionUID 0
REC: Method org.apache.torque.util.LargeSelect.<init>(Criteria,int,int,String) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 361
SWL: org.apache.torque.util.LargeSelect.getResults(int,int) calls Thread.sleep() with a lock held 569
SWL: org.apache.torque.util.LargeSelect.stopQuery() calls Thread.sleep() with a lock held 902
IS2: Inconsistent synchronization of org.apache.torque.util.LargeSelect.lastResults; locked 50% of time 479
IS2: Inconsistent synchronization of org.apache.torque.util.LargeSelect.blockBegin; locked 60% of time 951

org.apache.torque.dsfactory.AbstractDataSourceFactory

Violation Line
REC: Method org.apache.torque.dsfactory.AbstractDataSourceFactory.setProperty(String,org.apache.commons.configuration.Configuration,Object) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 170

org.apache.torque.dsfactory.PerUserPoolDataSourceFactory

Violation Line
RI: Class org.apache.torque.dsfactory.PerUserPoolDataSourceFactory implements same interface as superclass. 0
UwF: Field not initialized in constructor: org.apache.torque.dsfactory.PerUserPoolDataSourceFactory.ds 0

org.apache.torque.dsfactory.JndiDataSourceFactory

Violation Line
WMI: Method org.apache.torque.dsfactory.JndiDataSourceFactory.debugCtx(javax.naming.Context) makes inefficient use of keySet iterator instead of entrySet iterator 251
RI: Class org.apache.torque.dsfactory.JndiDataSourceFactory implements same interface as superclass. 0

org.apache.torque.dsfactory.SharedPoolDataSourceFactory

Violation Line
RI: Class org.apache.torque.dsfactory.SharedPoolDataSourceFactory implements same interface as superclass. 0
UwF: Field not initialized in constructor: org.apache.torque.dsfactory.SharedPoolDataSourceFactory.ds 0

org.apache.torque.manager.AbstractBaseManager

Violation Line
REC: Method org.apache.torque.manager.AbstractBaseManager.setRegion(String) catches Exception, but Exception is not thrown in the try block and RuntimeException is not explicitly caught 442
MS: org.apache.torque.manager.AbstractBaseManager.log isn't final but should be 0
IS2: Inconsistent synchronization of org.apache.torque.manager.AbstractBaseManager.isNew; locked 66% of time 457

org.apache.torque.manager.MethodCacheKey

Violation Line
EI2: org.apache.torque.manager.MethodCacheKey.init(java.io.Serializable[]) may expose internal representation by storing an externally mutable object into org.apache.torque.manager.MethodCacheKey.moreThanThree 168
SnVI: org.apache.torque.manager.MethodCacheKey is Serializable; consider declaring a serialVersionUID 0

org.apache.torque.adapter.DBCloudscape

Violation Line
DB: Method org.apache.torque.adapter.DBCloudscape.getIDMethodSQL(Object) uses the same code for two branches 91

org.apache.torque.oid.IDGeneratorFactory

Violation Line
MS: org.apache.torque.oid.IDGeneratorFactory.ID_GENERATOR_METHODS is a mutable array 0

org.apache.torque.util.LimitHelper

Violation Line
CD: Class org.apache.torque.util.LimitHelper has a circular dependency with other classes. 0

org.apache.torque.om.NumberKey

Violation Line
CD: Class org.apache.torque.om.NumberKey has a circular dependency with other classes. 0

org.apache.torque.om.SimpleKey

Violation Line
CD: Class org.apache.torque.om.SimpleKey has a circular dependency with other classes. 0
CD: Class org.apache.torque.om.SimpleKey has a circular dependency with other classes. 0

org.apache.torque.map.DatabaseMap

Violation Line
CD: Class org.apache.torque.map.DatabaseMap has a circular dependency with other classes. 0