Apache MyFaces
UI-Component Sets
Foundation

FindBugs Bug Detector Report

The following document contains the results of FindBugs Report

FindBugs Version is 1.3.9

Threshold is low

Effort is min

Summary

Classes Bugs Errors Missing Classes
120 64 0 0

Files

Class Bugs
org.apache.myfaces.test.base.AbstractJsfTestCase 1
org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase 1
org.apache.myfaces.test.base.junit4.AbstractJsfTestCase 1
org.apache.myfaces.test.cargo.CargoTestSetup 1
org.apache.myfaces.test.config.ConfigParser 1
org.apache.myfaces.test.config.ConfigParser$ComponentBean 1
org.apache.myfaces.test.config.ConfigParser$ConverterBean 1
org.apache.myfaces.test.config.ConfigParser$RenderKitIdRule 1
org.apache.myfaces.test.config.ConfigParser$RenderKitRule 1
org.apache.myfaces.test.config.ConfigParser$RendererBean 1
org.apache.myfaces.test.config.ConfigParser$ValidatorBean 1
org.apache.myfaces.test.el.ExpressionTokenizer 1
org.apache.myfaces.test.el.FacesImplicitObjectELResolver 1
org.apache.myfaces.test.el.FacesPropertyResolverChainWrapper 4
org.apache.myfaces.test.el.FacesResourceBundleELResolver 1
org.apache.myfaces.test.el.FacesVariableResolverChainWrapper 2
org.apache.myfaces.test.el.MockCompositeValueExpression 1
org.apache.myfaces.test.el.MockExpressionFactory 8
org.apache.myfaces.test.el.MockMethodExpression 2
org.apache.myfaces.test.el.MockValueExpression 1
org.apache.myfaces.test.el.MockVariableValueExpression 1
org.apache.myfaces.test.jmock.AbstractJmockJsfTestCase 1
org.apache.myfaces.test.mock.MockApplication12 1
org.apache.myfaces.test.mock.MockExternalContext$1 1
org.apache.myfaces.test.mock.MockExternalContext$LocalesIterator 1
org.apache.myfaces.test.mock.MockFacesContext 1
org.apache.myfaces.test.mock.MockHttpServletResponse 2
org.apache.myfaces.test.mock.MockHttpSession 1
org.apache.myfaces.test.mock.MockMethodBinding 3
org.apache.myfaces.test.mock.MockPortletContext 2
org.apache.myfaces.test.mock.MockPortletRequest 1
org.apache.myfaces.test.mock.MockPropertyResolver 3
org.apache.myfaces.test.mock.MockRenderKit$1 1
org.apache.myfaces.test.mock.MockResponseStateManager 1
org.apache.myfaces.test.mock.MockServlet 1
org.apache.myfaces.test.mock.MockServletContext 2
org.apache.myfaces.test.mock._Hex 1
org.apache.myfaces.test.mock.lifecycle.RestoreViewExecutor 1
org.apache.myfaces.test.runners.TestClassLoader 7

org.apache.myfaces.test.base.AbstractJsfTestCase

Bug Category Details Line Priority

org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase

Bug Category Details Line Priority

org.apache.myfaces.test.base.junit4.AbstractJsfTestCase

Bug Category Details Line Priority

org.apache.myfaces.test.cargo.CargoTestSetup

Bug Category Details Line Priority
CargoTestSetup.container not initialized in constructor STYLE UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR Low

org.apache.myfaces.test.config.ConfigParser

Bug Category Details Line Priority
Usage of GetResource in org.apache.myfaces.test.config.ConfigParser.translate(String[]) may be unsafe if class is extended BAD_PRACTICE UI_INHERITANCE_UNSAFE_GETRESOURCE 237 Low

org.apache.myfaces.test.config.ConfigParser$ComponentBean

Bug Category Details Line Priority
Should org.apache.myfaces.test.config.ConfigParser$ComponentBean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 248 Medium

org.apache.myfaces.test.config.ConfigParser$ConverterBean

Bug Category Details Line Priority
Should org.apache.myfaces.test.config.ConfigParser$ConverterBean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 301 Medium

org.apache.myfaces.test.config.ConfigParser$RenderKitIdRule

Bug Category Details Line Priority
Should org.apache.myfaces.test.config.ConfigParser$RenderKitIdRule be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 422 Medium

org.apache.myfaces.test.config.ConfigParser$RenderKitRule

Bug Category Details Line Priority
Should org.apache.myfaces.test.config.ConfigParser$RenderKitRule be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 400 Medium

org.apache.myfaces.test.config.ConfigParser$RendererBean

Bug Category Details Line Priority
Should org.apache.myfaces.test.config.ConfigParser$RendererBean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 445 Medium

org.apache.myfaces.test.config.ConfigParser$ValidatorBean

Bug Category Details Line Priority
Should org.apache.myfaces.test.config.ConfigParser$ValidatorBean be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 524 Medium

org.apache.myfaces.test.el.ExpressionTokenizer

Bug Category Details Line Priority
Switch statement found in org.apache.myfaces.test.el.ExpressionTokenizer.tokenize(CharSequence) where default case is missing STYLE SF_SWITCH_NO_DEFAULT 62 Low

org.apache.myfaces.test.el.FacesImplicitObjectELResolver

Bug Category Details Line Priority
Dead store to fcontext in org.apache.myfaces.test.el.FacesImplicitObjectELResolver.getFeatureDescriptors(ELContext, Object) STYLE DLS_DEAD_LOCAL_STORE 102 Medium

org.apache.myfaces.test.el.FacesPropertyResolverChainWrapper

Bug Category Details Line Priority
Dead store to elContext in org.apache.myfaces.test.el.FacesPropertyResolverChainWrapper.getType(ELContext, Object, Object) STYLE DLS_DEAD_LOCAL_STORE 93 Medium
Dead store to elContext in org.apache.myfaces.test.el.FacesPropertyResolverChainWrapper.getValue(ELContext, Object, Object) STYLE DLS_DEAD_LOCAL_STORE 146 Medium
Dead store to elContext in org.apache.myfaces.test.el.FacesPropertyResolverChainWrapper.isReadOnly(ELContext, Object, Object) STYLE DLS_DEAD_LOCAL_STORE 198 Medium
Dead store to elContext in org.apache.myfaces.test.el.FacesPropertyResolverChainWrapper.setValue(ELContext, Object, Object, Object) STYLE DLS_DEAD_LOCAL_STORE 252 Medium

org.apache.myfaces.test.el.FacesResourceBundleELResolver

Bug Category Details Line Priority
Dead store to value in org.apache.myfaces.test.el.FacesResourceBundleELResolver.getFeatureDescriptors(ELContext, Object) STYLE DLS_DEAD_LOCAL_STORE 94 Low

org.apache.myfaces.test.el.FacesVariableResolverChainWrapper

Bug Category Details Line Priority
Dead store to econtext in org.apache.myfaces.test.el.FacesVariableResolverChainWrapper.getValue(ELContext, Object, Object) STYLE DLS_DEAD_LOCAL_STORE 115 Medium
Dead store to elContext in org.apache.myfaces.test.el.FacesVariableResolverChainWrapper.getValue(ELContext, Object, Object) STYLE DLS_DEAD_LOCAL_STORE 118 Medium

org.apache.myfaces.test.el.MockCompositeValueExpression

Bug Category Details Line Priority
org.apache.myfaces.test.el.MockCompositeValueExpression doesn't override MockValueExpression.equals(Object) STYLE EQ_DOESNT_OVERRIDE_EQUALS 46 Medium

org.apache.myfaces.test.el.MockExpressionFactory

Bug Category Details Line Priority
Method org.apache.myfaces.test.el.MockExpressionFactory.coerce(Number, Class) invokes inefficient Double.valueOf(double) constructor; use MockExpressionFactory.java:[line 248] instead PERFORMANCE DM_FP_NUMBER_CTOR 248 Low
Method org.apache.myfaces.test.el.MockExpressionFactory.coerce(Number, Class) invokes inefficient Float.valueOf(float) constructor; use MockExpressionFactory.java:[line 252] instead PERFORMANCE DM_FP_NUMBER_CTOR 252 Low
Method org.apache.myfaces.test.el.MockExpressionFactory.<static initializer>() invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead PERFORMANCE DM_NUMBER_CTOR 49 Medium
Method org.apache.myfaces.test.el.MockExpressionFactory.coerce(Number, Class) invokes inefficient new Byte(byte) constructor; use Byte.valueOf(byte) instead PERFORMANCE DM_NUMBER_CTOR 244 Medium
Method org.apache.myfaces.test.el.MockExpressionFactory.coerce(Number, Class) invokes inefficient new Integer(int) constructor; use Integer.valueOf(int) instead PERFORMANCE DM_NUMBER_CTOR 256 Medium
Method org.apache.myfaces.test.el.MockExpressionFactory.coerce(Number, Class) invokes inefficient new Long(long) constructor; use Long.valueOf(long) instead PERFORMANCE DM_NUMBER_CTOR 260 Medium
Method org.apache.myfaces.test.el.MockExpressionFactory.coerce(Number, Class) invokes inefficient new Short(short) constructor; use Short.valueOf(short) instead PERFORMANCE DM_NUMBER_CTOR 264 Medium
Method org.apache.myfaces.test.el.MockExpressionFactory.coerceToType(Object, Class) invokes inefficient new Character(char) constructor; use Character.valueOf(char) instead PERFORMANCE DM_NUMBER_CTOR 135 Medium

org.apache.myfaces.test.el.MockMethodExpression

Bug Category Details Line Priority
new org.apache.myfaces.test.el.MockMethodExpression(String, Class[], Class) may expose internal representation by storing an externally mutable object into MockMethodExpression.signature MALICIOUS_CODE EI_EXPOSE_REP2 64 Medium
Questionable use of non-short-circuit logic in org.apache.myfaces.test.el.MockMethodExpression.equals(Object) STYLE NS_NON_SHORT_CIRCUIT 103 Low

org.apache.myfaces.test.el.MockValueExpression

Bug Category Details Line Priority
Questionable use of non-short-circuit logic in org.apache.myfaces.test.el.MockValueExpression.equals(Object) STYLE NS_NON_SHORT_CIRCUIT 95 Low

org.apache.myfaces.test.el.MockVariableValueExpression

Bug Category Details Line Priority
Questionable use of non-short-circuit logic in org.apache.myfaces.test.el.MockVariableValueExpression.equals(Object) STYLE NS_NON_SHORT_CIRCUIT 83 Low

org.apache.myfaces.test.jmock.AbstractJmockJsfTestCase

Bug Category Details Line Priority

org.apache.myfaces.test.mock.MockApplication12

Bug Category Details Line Priority
Exception is caught when Exception is not thrown in org.apache.myfaces.test.mock.MockApplication12.createComponent(ValueExpression, FacesContext, String) STYLE REC_CATCH_EXCEPTION 184 Low

org.apache.myfaces.test.mock.MockExternalContext$1

Bug Category Details Line Priority
The class org.apache.myfaces.test.mock.MockExternalContext$1 could be refactored into a named _static_ inner class PERFORMANCE SIC_INNER_SHOULD_BE_STATIC_ANON 355 Low

org.apache.myfaces.test.mock.MockExternalContext$LocalesIterator

Bug Category Details Line Priority
Should org.apache.myfaces.test.mock.MockExternalContext$LocalesIterator be a _static_ inner class? PERFORMANCE SIC_INNER_SHOULD_BE_STATIC 483 Medium

org.apache.myfaces.test.mock.MockFacesContext

Bug Category Details Line Priority
Unread field: org.apache.myfaces.test.mock.MockFacesContext.lifecycle PERFORMANCE URF_UNREAD_FIELD 112 Medium

org.apache.myfaces.test.mock.MockHttpServletResponse

Bug Category Details Line Priority
Unread field: org.apache.myfaces.test.mock.MockHttpServletResponse.contentLength PERFORMANCE URF_UNREAD_FIELD 146 Medium

org.apache.myfaces.test.mock.MockHttpSession

Bug Category Details Line Priority
Unused field: org.apache.myfaces.test.mock.MockHttpSession.webContainer PERFORMANCE UUF_UNUSED_FIELD Medium

org.apache.myfaces.test.mock.MockMethodBinding

Bug Category Details Line Priority
new org.apache.myfaces.test.mock.MockMethodBinding(Application, String, Class[]) may expose internal representation by storing an externally mutable object into MockMethodBinding.args MALICIOUS_CODE EI_EXPOSE_REP2 71 Medium
Comparison of String objects using == or != in org.apache.myfaces.test.mock.MockMethodBinding.equals(Object) BAD_PRACTICE ES_COMPARING_STRINGS_WITH_EQ 222 Low
Unread field: org.apache.myfaces.test.mock.MockMethodBinding.application PERFORMANCE URF_UNREAD_FIELD 70 Medium

org.apache.myfaces.test.mock.MockPortletContext

Bug Category Details Line Priority
Exception is caught when Exception is not thrown in org.apache.myfaces.test.mock.MockPortletContext.getResourceAsStream(String) STYLE REC_CATCH_EXCEPTION 248 Low
Method org.apache.myfaces.test.mock.MockPortletContext.getResourcePaths(String) concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 296 Medium

org.apache.myfaces.test.mock.MockPortletRequest

Bug Category Details Line Priority
Field only ever set to null: org.apache.myfaces.test.mock.MockPortletRequest.contextPath CORRECTNESS UWF_NULL_FIELD Medium

org.apache.myfaces.test.mock.MockPropertyResolver

Bug Category Details Line Priority
Method call in org.apache.myfaces.test.mock.MockPropertyResolver.getType(Object, int) passes null for nonnull parameter of getType(Object, Object) CORRECTNESS NP_NULL_PARAM_DEREF 245 Medium
Method call in org.apache.myfaces.test.mock.MockPropertyResolver.getValue(Object, int) passes null for nonnull parameter of getValue(Object, Object) CORRECTNESS NP_NULL_PARAM_DEREF 103 Medium
Method call in org.apache.myfaces.test.mock.MockPropertyResolver.setValue(Object, int, Object) passes null for nonnull parameter of setValue(Object, Object, Object) CORRECTNESS NP_NULL_PARAM_DEREF 162 Medium

org.apache.myfaces.test.mock.MockRenderKit$1

Bug Category Details Line Priority
The class org.apache.myfaces.test.mock.MockRenderKit$1 could be refactored into a named _static_ inner class PERFORMANCE SIC_INNER_SHOULD_BE_STATIC_ANON 111 Low

org.apache.myfaces.test.mock.MockResponseStateManager

Bug Category Details Line Priority
Should org.apache.myfaces.test.mock.MockResponseStateManager.getSavedState(FacesContext) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 291 Low

org.apache.myfaces.test.mock.MockServlet

Bug Category Details Line Priority
org.apache.myfaces.test.mock.MockServlet.config is a mutable servlet field MT_CORRECTNESS MSF_MUTABLE_SERVLET_FIELD 90 Low

org.apache.myfaces.test.mock.MockServletContext

Bug Category Details Line Priority
Exception is caught when Exception is not thrown in org.apache.myfaces.test.mock.MockServletContext.getResourceAsStream(String) STYLE REC_CATCH_EXCEPTION 278 Low
Method org.apache.myfaces.test.mock.MockServletContext.getResourcePaths(String) concatenates strings using + in a loop PERFORMANCE SBSC_USE_STRINGBUFFER_CONCATENATION 325 Medium

org.apache.myfaces.test.mock._Hex

Bug Category Details Line Priority
Should org.apache.myfaces.test.mock._Hex.getBytesUnchecked(String, String) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 276 Low

org.apache.myfaces.test.mock.lifecycle.RestoreViewExecutor

Bug Category Details Line Priority
Private method org.apache.myfaces.test.mock.lifecycle.RestoreViewExecutor.deriveViewId(FacesContext) is never called PERFORMANCE UPM_UNCALLED_PRIVATE_METHOD 155 Low

org.apache.myfaces.test.runners.TestClassLoader

Bug Category Details Line Priority
org.apache.myfaces.test.runners.TestClassLoader.getClassData(File) may fail to close stream on exception BAD_PRACTICE OS_OPEN_STREAM_EXCEPTION_PATH 224 Low
Should org.apache.myfaces.test.runners.TestClassLoader.getClassData(File) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 240 Low
Should org.apache.myfaces.test.runners.TestClassLoader.loadFileData(String, String) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 217 Low
Should org.apache.myfaces.test.runners.TestClassLoader.loadJarData(String, String) return a zero length array rather than null? STYLE PZLA_PREFER_ZERO_LENGTH_ARRAYS 258 Low
Redundant nullcheck of c which is known to be null in org.apache.myfaces.test.runners.TestClassLoader.loadClass(String, boolean) STYLE RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE 141 Low
Usage of GetResource in org.apache.myfaces.test.runners.TestClassLoader.readExcludedPackages() may be unsafe if class is extended BAD_PRACTICE UI_INHERITANCE_UNSAFE_GETRESOURCE 317 Low