PMD Results
The following document contains the results of PMD 6.29.0.
Violations By Priority
Priority 1
org/apache/fulcrum/factory/DefaultFactoryService.java
Rule | Violation | Line |
---|---|---|
VariableNamingConventions | Only variables that are final should contain underscores (except for underscores in standard prefix/suffix), '_factory' is not final. | 502 |
LocalVariableNamingConventions | The local variable name '_factory' doesn't match '[a-z][a-zA-Z0-9]*' | 502 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 564 |
Priority 2
org/apache/fulcrum/factory/DefaultFactoryService.java
Rule | Violation | Line |
---|---|---|
SingleMethodSingleton | Class contains multiple getInstance methods. Please review. | 51–581 |
org/apache/fulcrum/factory/Factory.java
Rule | Violation | Line |
---|---|---|
SingleMethodSingleton | Class contains multiple getInstance methods. Please review. | 34–101 |
org/apache/fulcrum/factory/FactoryService.java
Rule | Violation | Line |
---|---|---|
SingleMethodSingleton | Class contains multiple getInstance methods. Please review. | 32–144 |
Priority 3
org/apache/fulcrum/factory/DefaultFactoryService.java
Rule | Violation | Line |
---|---|---|
AtLeastOneConstructor | Each class should declare at least one constructor | 51–581 |
GodClass | Possible God Class (WMC=69, ATFD=27, TCC=5.833%) | 51–581 |
LooseCoupling | Avoid using implementation types like 'HashMap'; use the interface instead | 72 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 72 |
NonStaticInitializer | Non-static initializers are confusing | 74–83 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 88 |
ImmutableField | Private field 'classLoaders' could be made final; it is only initialized in the declaration or constructor. | 92 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 92 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 92 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 92 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 96 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 96 |
ImmutableField | Private field 'objectFactories' could be made final; it is only initialized in the declaration or constructor. | 96 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 100 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 100 |
ImmutableField | Private field 'objectFactoryClasses' could be made final; it is only initialized in the declaration or constructor. | 100 |
LongVariable | Avoid excessively long variable names like objectFactoryClasses | 100 |
MethodArgumentCouldBeFinal | Parameter 'type' is not assigned and could be declared final | 108 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 121 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 126 |
AvoidDuplicateLiterals | The String literal "Instantiation failed for class " appears 4 times in this file; the first occurrence is on line 132 | 132 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 134 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 153 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 153 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 155 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 157–167 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 164 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 166 |
MethodArgumentCouldBeFinal | Parameter 'params' is not assigned and could be declared final | 185 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 185 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 185 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 187 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 195 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 220 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 220 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 220 |
MethodArgumentCouldBeFinal | Parameter 'params' is not assigned and could be declared final | 220 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 223 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 225–235 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 232 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 234 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 249 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 251 |
SimplifiedTernary | Ternary operators that can be simplified with || or && | 252 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 252 |
MethodArgumentCouldBeFinal | Parameter 'clazz' is not assigned and could be declared final | 264 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 268 |
MethodArgumentCouldBeFinal | Parameter 'clazz' is not assigned and could be declared final | 285 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 285 |
MethodArgumentCouldBeFinal | Parameter 'params' is not assigned and could be declared final | 285 |
LocalVariableCouldBeFinal | Local variable 'sign' could be declared final | 290 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 291 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 292 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 309 |
MethodArgumentCouldBeFinal | Parameter 'clazz' is not assigned and could be declared final | 309 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 312–342 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 315 |
LocalVariableCouldBeFinal | Local variable 'loader' could be declared final | 315 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 322–336 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 324 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 325 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 327 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 327 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 327 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 327 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 339 |
MethodArgumentCouldBeFinal | Parameter 'object' is not assigned and could be declared final | 353 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 353 |
LocalVariableCouldBeFinal | Local variable 'bout' could be declared final | 355 |
LocalVariableCouldBeFinal | Local variable 'out' could be declared final | 359 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 365 |
LocalVariableCouldBeFinal | Local variable 'bin' could be declared final | 368 |
ShortVariable | Avoid variables with short names like in | 369 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 374 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 376 |
EmptyCatchBlock | Avoid empty catch blocks | 388–391 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 404 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 406 |
LocalVariableCouldBeFinal | Local variable 'loader' could be declared final | 406 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 411–418 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 420 |
LocalVariableCouldBeFinal | Local variable 'l' could be declared final | 425 |
EmptyCatchBlock | Avoid empty catch blocks | 431–434 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 450 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 450 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 452–459 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 454 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 471 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 490 |
LocalVariableCouldBeFinal | Local variable '_factory' could be declared final | 502 |
MethodArgumentCouldBeFinal | Parameter 'conf' is not assigned and could be declared final | 520 |
LocalVariableCouldBeFinal | Local variable 'nameVal' could be declared final | 537 |
LocalVariableCouldBeFinal | Local variable 'entry' could be declared final | 538 |
ControlStatementBraces | This statement should have braces | 538–539 |
ForLoopsMustUseBraces | Avoid using for statements without curly braces | 538–539 |
LocalVariableCouldBeFinal | Local variable 'className' could be declared final | 555 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 559 |
LocalVariableCouldBeFinal | Local variable 'loader' could be declared final | 559 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 562 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 567 |
org/apache/fulcrum/factory/FactoryException.java
Rule | Violation | Line |
---|---|---|
MethodArgumentCouldBeFinal | Parameter 'e' is not assigned and could be declared final | 48 |
ShortVariable | Avoid variables with short names like e | 48 |
MethodArgumentCouldBeFinal | Parameter 'message' is not assigned and could be declared final | 48 |
MethodArgumentCouldBeFinal | Parameter 'e' is not assigned and could be declared final | 58 |
ShortVariable | Avoid variables with short names like e | 58 |
MethodArgumentCouldBeFinal | Parameter 'msg' is not assigned and could be declared final | 68 |
org/apache/fulcrum/factory/utils/ObjectInputStreamForContext.java
Rule | Violation | Line |
---|---|---|
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 38 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 45–48 |
ShortVariable | Avoid variables with short names like in | 57 |
MethodArgumentCouldBeFinal | Parameter 'in' is not assigned and could be declared final | 57 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 58 |
MissingOverride | The method 'resolveClass(ObjectStreamClass)' is missing an @Override annotation. | 73–79 |
MethodArgumentCouldBeFinal | Parameter 'v' is not assigned and could be declared final | 73 |
ShortVariable | Avoid variables with short names like v | 73 |
Priority 4
org/apache/fulcrum/factory/DefaultFactoryService.java
Rule | Violation | Line |
---|---|---|
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 285 |
org/apache/fulcrum/factory/Factory.java
Rule | Violation | Line |
---|---|---|
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 75 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 92 |
org/apache/fulcrum/factory/FactoryService.java
Rule | Violation | Line |
---|---|---|
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 92 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 114 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 142 |
Priority 5
org/apache/fulcrum/factory/DefaultFactoryService.java
Rule | Violation | Line |
---|---|---|
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '130'-'138'). | 130–138 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '160'-'171'). | 160–171 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '191'-'199'). | 191–199 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '228'-'239'). | 228–239 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'loader' (lines '315'-'343'). | 315–343 |
DataflowAnomalyAnalysis | Found 'DD'-anomaly for variable 'sign' (lines '316'-'319'). | 316–319 |
DataflowAnomalyAnalysis | Found 'DD'-anomaly for variable 'sign' (lines '335'-'319'). | 335–319 |
Files
org/apache/fulcrum/factory/DefaultFactoryService.java
Rule | Violation | Priority | Line |
---|---|---|---|
SingleMethodSingleton | Class contains multiple getInstance methods. Please review. | 2 | 51–581 |
AtLeastOneConstructor | Each class should declare at least one constructor | 3 | 51–581 |
GodClass | Possible God Class (WMC=69, ATFD=27, TCC=5.833%) | 3 | 51–581 |
LooseCoupling | Avoid using implementation types like 'HashMap'; use the interface instead | 3 | 72 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 72 |
NonStaticInitializer | Non-static initializers are confusing | 3 | 74–83 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 88 |
ImmutableField | Private field 'classLoaders' could be made final; it is only initialized in the declaration or constructor. | 3 | 92 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 92 |
LooseCoupling | Avoid using implementation types like 'ArrayList'; use the interface instead | 3 | 92 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 92 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 96 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 96 |
ImmutableField | Private field 'objectFactories' could be made final; it is only initialized in the declaration or constructor. | 3 | 96 |
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 100 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 100 |
ImmutableField | Private field 'objectFactoryClasses' could be made final; it is only initialized in the declaration or constructor. | 3 | 100 |
LongVariable | Avoid excessively long variable names like objectFactoryClasses | 3 | 100 |
MethodArgumentCouldBeFinal | Parameter 'type' is not assigned and could be declared final | 3 | 108 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 121 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 3 | 126 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '130'-'138'). | 5 | 130–138 |
AvoidDuplicateLiterals | The String literal "Instantiation failed for class " appears 4 times in this file; the first occurrence is on line 132 | 3 | 132 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 134 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 153 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 3 | 153 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 3 | 155 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 157–167 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '160'-'171'). | 5 | 160–171 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 164 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 166 |
MethodArgumentCouldBeFinal | Parameter 'params' is not assigned and could be declared final | 3 | 185 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 185 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 3 | 185 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 3 | 187 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '191'-'199'). | 5 | 191–199 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 195 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 220 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 3 | 220 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 3 | 220 |
MethodArgumentCouldBeFinal | Parameter 'params' is not assigned and could be declared final | 3 | 220 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 3 | 223 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 225–235 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'clazz' (lines '228'-'239'). | 5 | 228–239 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 232 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 234 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 249 |
LocalVariableCouldBeFinal | Local variable 'factory' could be declared final | 3 | 251 |
SimplifiedTernary | Ternary operators that can be simplified with || or && | 3 | 252 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 252 |
MethodArgumentCouldBeFinal | Parameter 'clazz' is not assigned and could be declared final | 3 | 264 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 268 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 285 |
MethodArgumentCouldBeFinal | Parameter 'clazz' is not assigned and could be declared final | 3 | 285 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 3 | 285 |
MethodArgumentCouldBeFinal | Parameter 'params' is not assigned and could be declared final | 3 | 285 |
LocalVariableCouldBeFinal | Local variable 'sign' could be declared final | 3 | 290 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 3 | 291 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 292 |
MethodArgumentCouldBeFinal | Parameter 'signature' is not assigned and could be declared final | 3 | 309 |
MethodArgumentCouldBeFinal | Parameter 'clazz' is not assigned and could be declared final | 3 | 309 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 312–342 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 3 | 315 |
LocalVariableCouldBeFinal | Local variable 'loader' could be declared final | 3 | 315 |
DataflowAnomalyAnalysis | Found 'DU'-anomaly for variable 'loader' (lines '315'-'343'). | 5 | 315–343 |
DataflowAnomalyAnalysis | Found 'DD'-anomaly for variable 'sign' (lines '316'-'319'). | 5 | 316–319 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 322–336 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 3 | 324 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 3 | 325 |
LawOfDemeter | Potential violation of Law of Demeter (object not created locally) | 3 | 327 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 3 | 327 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 3 | 327 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 3 | 327 |
DataflowAnomalyAnalysis | Found 'DD'-anomaly for variable 'sign' (lines '335'-'319'). | 5 | 335–319 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 339 |
MethodArgumentCouldBeFinal | Parameter 'object' is not assigned and could be declared final | 3 | 353 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 3 | 353 |
LocalVariableCouldBeFinal | Local variable 'bout' could be declared final | 3 | 355 |
LocalVariableCouldBeFinal | Local variable 'out' could be declared final | 3 | 359 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 365 |
LocalVariableCouldBeFinal | Local variable 'bin' could be declared final | 3 | 368 |
ShortVariable | Avoid variables with short names like in | 3 | 369 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 374 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 376 |
EmptyCatchBlock | Avoid empty catch blocks | 3 | 388–391 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 404 |
UseProperClassLoader | In J2EE, getClassLoader() might not work as expected. Use Thread.currentThread().getContextClassLoader() instead. | 3 | 406 |
LocalVariableCouldBeFinal | Local variable 'loader' could be declared final | 3 | 406 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 411–418 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 420 |
LocalVariableCouldBeFinal | Local variable 'l' could be declared final | 3 | 425 |
EmptyCatchBlock | Avoid empty catch blocks | 3 | 431–434 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 450 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 3 | 450 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 452–459 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 454 |
MethodArgumentCouldBeFinal | Parameter 'className' is not assigned and could be declared final | 3 | 471 |
OnlyOneReturn | A method should have only one exit point, and that should be the last statement in the method | 3 | 490 |
LocalVariableCouldBeFinal | Local variable '_factory' could be declared final | 3 | 502 |
VariableNamingConventions | Only variables that are final should contain underscores (except for underscores in standard prefix/suffix), '_factory' is not final. | 1 | 502 |
LocalVariableNamingConventions | The local variable name '_factory' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 502 |
MethodArgumentCouldBeFinal | Parameter 'conf' is not assigned and could be declared final | 3 | 520 |
LocalVariableCouldBeFinal | Local variable 'nameVal' could be declared final | 3 | 537 |
LocalVariableCouldBeFinal | Local variable 'entry' could be declared final | 3 | 538 |
ControlStatementBraces | This statement should have braces | 3 | 538–539 |
ForLoopsMustUseBraces | Avoid using for statements without curly braces | 3 | 538–539 |
LocalVariableCouldBeFinal | Local variable 'className' could be declared final | 3 | 555 |
LawOfDemeter | Potential violation of Law of Demeter (method chain calls) | 3 | 559 |
LocalVariableCouldBeFinal | Local variable 'loader' could be declared final | 3 | 559 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 562 |
AvoidThrowingRawExceptionTypes | Avoid throwing raw exception types. | 1 | 564 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 567 |
org/apache/fulcrum/factory/Factory.java
Rule | Violation | Priority | Line |
---|---|---|---|
SingleMethodSingleton | Class contains multiple getInstance methods. Please review. | 2 | 34–101 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 75 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 92 |
org/apache/fulcrum/factory/FactoryException.java
Rule | Violation | Priority | Line |
---|---|---|---|
MethodArgumentCouldBeFinal | Parameter 'e' is not assigned and could be declared final | 3 | 48 |
ShortVariable | Avoid variables with short names like e | 3 | 48 |
MethodArgumentCouldBeFinal | Parameter 'message' is not assigned and could be declared final | 3 | 48 |
MethodArgumentCouldBeFinal | Parameter 'e' is not assigned and could be declared final | 3 | 58 |
ShortVariable | Avoid variables with short names like e | 3 | 58 |
MethodArgumentCouldBeFinal | Parameter 'msg' is not assigned and could be declared final | 3 | 68 |
org/apache/fulcrum/factory/FactoryService.java
Rule | Violation | Priority | Line |
---|---|---|---|
SingleMethodSingleton | Class contains multiple getInstance methods. Please review. | 2 | 32–144 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 92 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 114 |
UseVarargs | Consider using varargs for methods or constructors which take an array the last parameter. | 4 | 142 |
org/apache/fulcrum/factory/utils/ObjectInputStreamForContext.java
Rule | Violation | Priority | Line |
---|---|---|---|
BeanMembersShouldSerialize | Found non-transient, non-static member. Please mark as transient or provide accessors. | 3 | 38 |
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 45–48 |
ShortVariable | Avoid variables with short names like in | 3 | 57 |
MethodArgumentCouldBeFinal | Parameter 'in' is not assigned and could be declared final | 3 | 57 |
MethodArgumentCouldBeFinal | Parameter 'loader' is not assigned and could be declared final | 3 | 58 |
MissingOverride | The method 'resolveClass(ObjectStreamClass)' is missing an @Override annotation. | 3 | 73–79 |
MethodArgumentCouldBeFinal | Parameter 'v' is not assigned and could be declared final | 3 | 73 |
ShortVariable | Avoid variables with short names like v | 3 | 73 |