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
Files
org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMockTestCase
Bug | Category | Details | Line | Priority |
---|
org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMultipleRequestsTestCase
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
instanceof will always return true in org.apache.myfaces.test.base.junit4.AbstractJsfConfigurableMultipleRequestsTestCase.setUpFacesContext(), since all org.apache.myfaces.test.mock.MockFacesContext are instances of org.apache.myfaces.test.mock.MockFacesContext | STYLE | BC_VACUOUS_INSTANCEOF | 273 | Medium |
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 | 257 | Low |
org.apache.myfaces.test.config.ConfigParser$BehaviorBean
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.apache.myfaces.test.config.ConfigParser$BehaviorBean be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 658 | Medium |
org.apache.myfaces.test.config.ConfigParser$ClientBehaviorRendererBean
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.apache.myfaces.test.config.ConfigParser$ClientBehaviorRendererBean be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 594 | Medium |
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 | 268 | 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 | 321 | 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 | 442 | 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 | 420 | 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 | 465 | 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 | 544 | 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 |
Class org.apache.myfaces.test.el.MockCompositeValueExpression defines non-transient non-serializable instance field valueExpressionChain | BAD_PRACTICE | SE_BAD_FIELD | Low |
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.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.MockApplication20
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Synchronization performed on java.util.concurrent.ConcurrentHashMap in org.apache.myfaces.test.mock.MockApplication20.subscribeToEvent(Class, Class, SystemEventListener) | MT_CORRECTNESS | JLM_JSR166_UTILCONCURRENT_MONITORENTER | 768 | Medium |
Load of known null value in org.apache.myfaces.test.mock.MockApplication20.publishEvent(FacesContext, Class, Class, Object) | STYLE | NP_LOAD_OF_KNOWN_NULL_VALUE | 598 | Low |
Redundant nullcheck of listenerForList which is known to be null in org.apache.myfaces.test.mock.MockApplication20._handleListenerForAnnotations(FacesContext, Object, Class, UIComponent, boolean) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE | 256 | Low |
Redundant nullcheck of dependencyList which is known to be null in org.apache.myfaces.test.mock.MockApplication20._handleResourceDependencyAnnotations(FacesContext, Class, UIComponent, boolean) | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NULL_VALUE | 357 | Low |
Exception is caught when Exception is not thrown in org.apache.myfaces.test.mock.MockApplication20._createEvent(Class, Object, SystemEvent) | STYLE | REC_CATCH_EXCEPTION | 548 | Low |
Exception is caught when Exception is not thrown in org.apache.myfaces.test.mock.MockApplication20.createComponent(ValueBinding, FacesContext, String) | STYLE | REC_CATCH_EXCEPTION | 834 | Low |
org.apache.myfaces.test.mock.MockApplication20$SystemListenerEntry
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Inconsistent synchronization of org.apache.myfaces.test.mock.MockApplication20$SystemListenerEntry._lstSystemEventListener; locked 42% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 162 | Medium |
Inconsistent synchronization of org.apache.myfaces.test.mock.MockApplication20$SystemListenerEntry._sourceClassMap; locked 40% of time | MT_CORRECTNESS | IS2_INCONSISTENT_SYNC | 156 | Medium |
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.MockFlash
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Dead store to response in org.apache.myfaces.test.mock.MockFlash._addPostbackMapKey(ExternalContext) | STYLE | DLS_DEAD_LOCAL_STORE | 499 | Medium |
org.apache.myfaces.test.mock.MockFlash$MessageEntry
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.myfaces.test.mock.MockFlash$MessageEntry is Serializable; consider declaring a serialVersionUID | BAD_PRACTICE | SE_NO_SERIALVERSIONID | 392 | Low |
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 | 292 | 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.MockSubKeyMap$Entry
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Redundant nullcheck of key, which is known to be non-null in org.apache.myfaces.test.mock.MockSubKeyMap$Entry.hashCode() | STYLE | RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE | 294 | Low |
org.apache.myfaces.test.mock._ELText
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.myfaces.test.mock._ELText.parse(ExpressionFactory, ELContext, String) invokes inefficient new String(String) constructor | PERFORMANCE | DM_STRING_CTOR | 392 | Medium |
org.apache.myfaces.test.mock._ELText$LiteralValueExpression
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.myfaces.test.mock._ELText$LiteralValueExpression.equals(Object) always returns false | CORRECTNESS | EQ_ALWAYS_FALSE | 74 | High |
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.mock.resource.MockResourceHandlerSupport
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
org.apache.myfaces.test.mock.resource.MockResourceHandlerSupport.getResourceLoaders() may expose internal representation by returning MockResourceHandlerSupport._resourceLoaders | MALICIOUS_CODE | EI_EXPOSE_REP | 117 | Medium |
new org.apache.myfaces.test.mock.resource.MockResourceHandlerSupport(boolean, String, MockResourceLoader[]) may expose internal representation by storing an externally mutable object into MockResourceHandlerSupport._resourceLoaders | MALICIOUS_CODE | EI_EXPOSE_REP2 | 75 | Medium |
org.apache.myfaces.test.mock.resource.MockResourceHandlerSupport.setResourceLoaders(MockResourceLoader[]) may expose internal representation by storing an externally mutable object into MockResourceHandlerSupport._resourceLoaders | MALICIOUS_CODE | EI_EXPOSE_REP2 | 122 | Medium |
org.apache.myfaces.test.mock.resource.MockResourceLoader$VersionComparator
Bug | Category | Details | Line | Priority |
---|---|---|---|---|
Should org.apache.myfaces.test.mock.resource.MockResourceLoader$VersionComparator be a _static_ inner class? | PERFORMANCE | SIC_INNER_SHOULD_BE_STATIC | 84 | Medium |
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 |