Apache Commons logo Commons Validator

FindBugs Bug Detector Report

The following document contains the results of FindBugs

FindBugs Version is 3.0.1

Threshold is

Effort is min

Summary

Classes Bugs Errors Missing Classes
74 17 0 0

org.apache.commons.validator.Field

Bug Category Details Line Priority
instanceof will always return true for all non-null values in org.apache.commons.validator.Field.getVarValue(String), since all org.apache.commons.validator.Var are instances of org.apache.commons.validator.Var STYLE BC_VACUOUS_INSTANCEOF 498 Medium

org.apache.commons.validator.GenericTypeValidator

Bug Category Details Line Priority
org.apache.commons.validator.GenericTypeValidator.formatByte(String) invokes inefficient new Byte(String) constructor; use Byte.valueOf(String) instead PERFORMANCE DM_NUMBER_CTOR 55 Medium
org.apache.commons.validator.GenericTypeValidator.formatByte(String, Locale) invokes inefficient new Byte(byte) constructor; use Byte.valueOf(byte) instead PERFORMANCE DM_NUMBER_CTOR 88 Medium
org.apache.commons.validator.GenericTypeValidator.formatCreditCard(String) invokes inefficient new Long(String) constructor; use Long.valueOf(String) instead PERFORMANCE DM_NUMBER_CTOR 469 Medium
org.apache.commons.validator.GenericTypeValidator.formatInt(String) invokes inefficient new Integer(String) constructor; use Integer.valueOf(String) instead PERFORMANCE DM_NUMBER_CTOR 159 Medium
org.apache.commons.validator.GenericTypeValidator.formatInt(String, Locale) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead PERFORMANCE DM_NUMBER_CTOR 192 Medium
org.apache.commons.validator.GenericTypeValidator.formatLong(String) invokes inefficient new Long(String) constructor; use Long.valueOf(String) instead PERFORMANCE DM_NUMBER_CTOR 211 Medium
org.apache.commons.validator.GenericTypeValidator.formatLong(String, Locale) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead PERFORMANCE DM_NUMBER_CTOR 244 Medium
org.apache.commons.validator.GenericTypeValidator.formatShort(String) invokes inefficient new Short(String) constructor; use Short.valueOf(String) instead PERFORMANCE DM_NUMBER_CTOR 107 Medium
org.apache.commons.validator.GenericTypeValidator.formatShort(String, Locale) invokes inefficient new Short(short) constructor; use Short.valueOf(short) instead PERFORMANCE DM_NUMBER_CTOR 140 Medium

org.apache.commons.validator.ValidatorAction

Bug Category Details Line Priority
Found reliance on default encoding in org.apache.commons.validator.ValidatorAction.readJavascriptFile(String): new java.io.InputStreamReader(InputStream) I18N DM_DEFAULT_ENCODING 423 High
Inconsistent synchronization of org.apache.commons.validator.ValidatorAction.jsFunction; locked 62% of time MT_CORRECTNESS IS2_INCONSISTENT_SYNC 348 Medium
Class org.apache.commons.validator.ValidatorAction defines non-transient non-serializable instance field validationMethod BAD_PRACTICE SE_BAD_FIELD Not available High

org.apache.commons.validator.routines.ByteValidator

Bug Category Details Line Priority
org.apache.commons.validator.routines.ByteValidator.processParsedValue(Object, Format) invokes inefficient new Byte(byte) constructor; use Byte.valueOf(byte) instead PERFORMANCE DM_NUMBER_CTOR 252 Medium

org.apache.commons.validator.routines.IntegerValidator

Bug Category Details Line Priority
org.apache.commons.validator.routines.IntegerValidator.processParsedValue(Object, Format) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead PERFORMANCE DM_NUMBER_CTOR 252 Medium

org.apache.commons.validator.routines.LongValidator

Bug Category Details Line Priority
org.apache.commons.validator.routines.LongValidator.processParsedValue(Object, Format) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead PERFORMANCE DM_NUMBER_CTOR 247 Medium

org.apache.commons.validator.routines.ShortValidator

Bug Category Details Line Priority
org.apache.commons.validator.routines.ShortValidator.processParsedValue(Object, Format) invokes inefficient new Short(short) constructor; use Short.valueOf(short) instead PERFORMANCE DM_NUMBER_CTOR 252 Medium