Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/extend/modules/hit/business/HitHome.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 10–117

fr/paris/lutece/plugins/extend/service/ExtendableResourceRemovalListener.java

Rule Violation Line
DoubleCheckedLocking Double checked locking is not thread safe in Java. 103–118
DoubleCheckedLocking Double checked locking is not thread safe in Java. 125–140

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderCacheService.java

Rule Violation Line
ConstructorCallsOverridableMethod Overridable method 'getName' called during object construction 51

fr/paris/lutece/plugins/extend/service/extender/facade/ResourceExtenderServiceFacade.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 16–166

fr/paris/lutece/plugins/extend/util/ExtendErrorException.java

Rule Violation Line
FieldNamingConventions The final field name '_strErrorMessage' doesn't match '[a-z][a-zA-Z0-9]*' 44

fr/paris/lutece/plugins/extend/web/component/NoConfigResourceExtenderComponent.java

Rule Violation Line
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 65–68
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 74–77

Priority 2

fr/paris/lutece/plugins/extend/modules/hit/web/component/HitResourceExtenderComponent.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 171
GuardLogStatement Logger calls should be surrounded by log level guards. 198

fr/paris/lutece/plugins/extend/web/ResourceExtenderJspBean.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 195
GuardLogStatement Logger calls should be surrounded by log level guards. 238

Priority 3

fr/paris/lutece/plugins/extend/business/DefaultExtendableResource.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 51–53

fr/paris/lutece/plugins/extend/business/DefaultExtendableResourceDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 56–67

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 96–110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 192
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 214
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 235
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 243

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDTOFilter.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 87–89
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 124–127
PositionLiteralsFirstInComparisons Position literals first in String comparisons 401
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 453

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 92–110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 148
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 184

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryFilter.java

Rule Violation Line
ExcessivePublicCount This class has a bunch of public methods and attributes 34–804
TooManyFields Too many fields 53–804
GodClass Possible God Class (WMC=73, ATFD=23, TCC=4.374%) 53–804
TooManyMethods This class has too many methods, consider refactoring it. 54–804
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 687
NPathComplexity The method 'setFilterValues(DAOUtil)' has an NPath complexity of 512 700–748
CyclomaticComplexity The method 'setFilterValues(DAOUtil)' has a cyclomatic complexity of 10. 700–748
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 793

fr/paris/lutece/plugins/extend/modules/hit/business/HitDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 97–111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 240
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 244

fr/paris/lutece/plugins/extend/modules/hit/business/HitHome.java

Rule Violation Line
CommentRequired Header comments are required 10–117

fr/paris/lutece/plugins/extend/modules/hit/service/HitAddOnService.java

Rule Violation Line
UnnecessaryReturn Avoid unnecessary return statements 77

fr/paris/lutece/plugins/extend/modules/hit/service/IHitService.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'findIdMostHitedResources': the method is declared in an interface type 120

fr/paris/lutece/plugins/extend/modules/hit/web/action/HitInstallerPluginAction.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 74–75

fr/paris/lutece/plugins/extend/modules/hit/web/component/HitResourceExtenderComponent.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 119
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 119
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 140
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 140

fr/paris/lutece/plugins/extend/service/ExtendableResourceManager.java

Rule Violation Line
CollapsibleIfStatements These nested if statements could be combined 109–112

fr/paris/lutece/plugins/extend/service/ExtendableResourceRemovalListener.java

Rule Violation Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 71

fr/paris/lutece/plugins/extend/service/ExtendableResourceResourceIdService.java

Rule Violation Line
DataClass The class 'ExtendableResourceResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 56–168
CallSuperInConstructor It is a good practice to call super() in a constructor 81–84
ShortVariable Avoid variables with short names like rt 92
ShortVariable Avoid variables with short names like p 98
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 137
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 137
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 138
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 139
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 140
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 141

fr/paris/lutece/plugins/extend/service/content/ExtendableContentPostProcessor.java

Rule Violation Line
CyclomaticComplexity The method 'process(HttpServletRequest, String)' has a cyclomatic complexity of 15. 142–247
ExcessiveMethodLength Avoid really long methods. 142–247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 161
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 161
ShortVariable Avoid variables with short names like sb 167
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 168
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 169
UnusedLocalVariable Avoid unused local variables such as 'strMarker'. 189
CollapsibleIfStatements These nested if statements could be combined 225–231

fr/paris/lutece/plugins/extend/service/converter/ExtenderStringMapper.java

Rule Violation Line
MissingBreakInSwitch A switch statement does not contain a break 74–98

fr/paris/lutece/plugins/extend/service/extender/IResourceExtenderService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 58–332
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 236–237

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderCacheService.java

Rule Violation Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the ResourceExtenderCacheService constructor if you want a default access modifier 49–52
CallSuperInConstructor It is a good practice to call super() in a constructor 49–52

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderService.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 68–565
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 292
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 297
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 371
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 371
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 400–401
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 536
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 536
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 540
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 540

fr/paris/lutece/plugins/extend/service/extender/config/ResourceExtenderConfigService.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 170

fr/paris/lutece/plugins/extend/service/extender/facade/ExtenderType.java

Rule Violation Line
DefaultPackage Use explicit scoping instead of the default package private level 17
ShortVariable Avoid variables with short names like _t 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _t field if you want a default access modifier 17
ImmutableField Private field '_strType' could be made final; it is only initialized in the declaration or constructor. 21
ShortVariable Avoid variables with short names like t 49
ShortVariable Avoid variables with short names like t 71
ControlStatementBraces This statement should have braces 116
ControlStatementBraces This statement should have braces 133
ControlStatementBraces This statement should have braces 151
ControlStatementBraces This statement should have braces 169

fr/paris/lutece/plugins/extend/service/extender/facade/IExtendableResourceResult.java

Rule Violation Line
CommentRequired Header comments are required 3–19

fr/paris/lutece/plugins/extend/service/extender/facade/InfoExtenderException.java

Rule Violation Line
CommentRequired Header comments are required 3–31

fr/paris/lutece/plugins/extend/service/extender/facade/ResourceExtenderServiceFacade.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 160
ConfusingTernary Avoid if (x != y) ..; else ..; 161

fr/paris/lutece/plugins/extend/service/extender/history/IResourceExtenderHistoryService.java

Rule Violation Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 112

fr/paris/lutece/plugins/extend/service/extender/history/ResourceExtenderHistoryService.java

Rule Violation Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 102–103
ConfusingTernary Avoid if (x != y) ..; else ..; 111

fr/paris/lutece/plugins/extend/service/type/ExtendableResourceTypeService.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 87

fr/paris/lutece/plugins/extend/util/ExtendErrorException.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 52–55

fr/paris/lutece/plugins/extend/util/ExtendUtils.java

Rule Violation Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 87

fr/paris/lutece/plugins/extend/util/OperatorEnum.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'OperatorEnum(int, String)': enum constructors are implicitly private 60–64
MissingOverride The method 'toString()' is missing an @Override annotation. 81–84

fr/paris/lutece/plugins/extend/web/ResourceExtenderJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–1101
ExcessiveClassLength Avoid really long classes. 90–1101
CyclomaticComplexity The class 'ResourceExtenderJspBean' has a total cyclomatic complexity of 89 (highest 10). 90–1101
ImmutableField Private field '_resourceExtenderSearchFields' could be made final; it is only initialized in the declaration or constructor. 163
ImmutableField Private field '_resourceTypeService' could be made final; it is only initialized in the declaration or constructor. 164
ImmutableField Private field '_extenderService' could be made final; it is only initialized in the declaration or constructor. 165
ImmutableField Private field '_extenderComponentManager' could be made final; it is only initialized in the declaration or constructor. 166
ImmutableField Private field '_resourceManager' could be made final; it is only initialized in the declaration or constructor. 167
ImmutableField Private field '_defaultResourceService' could be made final; it is only initialized in the declaration or constructor. 168
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 169
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 243
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 243
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 339
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 376
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 376
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 604
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 604
CyclomaticComplexity The method 'doCreateResourceExtender(HttpServletRequest)' has a cyclomatic complexity of 10. 623–689
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 681–684
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 731
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 796
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 821
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'action' 1036
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 1087

fr/paris/lutece/plugins/extend/web/action/CreateResourceExtenderPluginAction.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 81–82

fr/paris/lutece/plugins/extend/web/action/ModifyDefaultConfigPluginAction.java

Rule Violation Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 159

fr/paris/lutece/plugins/extend/web/action/ResourceExtenderSearchFields.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 246–247

fr/paris/lutece/plugins/extend/web/component/ResourceExtenderComponentManager.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–395
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 206
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 279
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 319–320
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 322
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 322
CyclomaticComplexity The method 'doSaveConfig(ResourceExtenderDTO, HttpServletRequest)' has a cyclomatic complexity of 10. 341–394
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 352–361
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 363–391
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 373–376
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 381

fr/paris/lutece/plugins/extend/web/servlet/ExtendContent.java

Rule Violation Line
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 79–82

Priority 4

fr/paris/lutece/plugins/extend/business/extender/config/IExtenderConfigDAO.java

Rule Violation Line
GenericsNaming Generics names should be a one letter long and upper case. 44

fr/paris/lutece/plugins/extend/modules/hit/business/Hit.java

Rule Violation Line
ShortClassName Avoid short class names like Hit 45–127

Files

fr/paris/lutece/plugins/extend/business/DefaultExtendableResource.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 51–53

fr/paris/lutece/plugins/extend/business/DefaultExtendableResourceDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 56–67

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 96–110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 192
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 214
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 235
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 243

fr/paris/lutece/plugins/extend/business/extender/ResourceExtenderDTOFilter.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 87–89
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 124–127
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 401
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 453

fr/paris/lutece/plugins/extend/business/extender/config/IExtenderConfigDAO.java

Rule Violation Priority Line
GenericsNaming Generics names should be a one letter long and upper case. 4 44

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 92–110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 148
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 184

fr/paris/lutece/plugins/extend/business/extender/history/ResourceExtenderHistoryFilter.java

Rule Violation Priority Line
ExcessivePublicCount This class has a bunch of public methods and attributes 3 34–804
TooManyFields Too many fields 3 53–804
GodClass Possible God Class (WMC=73, ATFD=23, TCC=4.374%) 3 53–804
TooManyMethods This class has too many methods, consider refactoring it. 3 54–804
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 3 687
NPathComplexity The method 'setFilterValues(DAOUtil)' has an NPath complexity of 512 3 700–748
CyclomaticComplexity The method 'setFilterValues(DAOUtil)' has a cyclomatic complexity of 10. 3 700–748
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 793

fr/paris/lutece/plugins/extend/modules/hit/business/Hit.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Hit 4 45–127

fr/paris/lutece/plugins/extend/modules/hit/business/HitDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 97–111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 240
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 244

fr/paris/lutece/plugins/extend/modules/hit/business/HitHome.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 10–117
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 10–117

fr/paris/lutece/plugins/extend/modules/hit/service/HitAddOnService.java

Rule Violation Priority Line
UnnecessaryReturn Avoid unnecessary return statements 3 77

fr/paris/lutece/plugins/extend/modules/hit/service/IHitService.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'findIdMostHitedResources': the method is declared in an interface type 3 120

fr/paris/lutece/plugins/extend/modules/hit/web/action/HitInstallerPluginAction.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 74–75

fr/paris/lutece/plugins/extend/modules/hit/web/component/HitResourceExtenderComponent.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 119
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 119
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 140
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 140
GuardLogStatement Logger calls should be surrounded by log level guards. 2 171
GuardLogStatement Logger calls should be surrounded by log level guards. 2 198

fr/paris/lutece/plugins/extend/service/ExtendableResourceManager.java

Rule Violation Priority Line
CollapsibleIfStatements These nested if statements could be combined 3 109–112

fr/paris/lutece/plugins/extend/service/ExtendableResourceRemovalListener.java

Rule Violation Priority Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 71
DoubleCheckedLocking Double checked locking is not thread safe in Java. 1 103–118
DoubleCheckedLocking Double checked locking is not thread safe in Java. 1 125–140

fr/paris/lutece/plugins/extend/service/ExtendableResourceResourceIdService.java

Rule Violation Priority Line
DataClass The class 'ExtendableResourceResourceIdService' is suspected to be a Data Class (WOC=0.000%, NOPA=4, NOAM=0, WMC=1) 3 56–168
CallSuperInConstructor It is a good practice to call super() in a constructor 3 81–84
ShortVariable Avoid variables with short names like rt 3 92
ShortVariable Avoid variables with short names like p 3 98
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 137
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 137
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 138
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 139
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 140
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 141

fr/paris/lutece/plugins/extend/service/content/ExtendableContentPostProcessor.java

Rule Violation Priority Line
CyclomaticComplexity The method 'process(HttpServletRequest, String)' has a cyclomatic complexity of 15. 3 142–247
ExcessiveMethodLength Avoid really long methods. 3 142–247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 161
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 161
ShortVariable Avoid variables with short names like sb 3 167
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 168
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 169
UnusedLocalVariable Avoid unused local variables such as 'strMarker'. 3 189
CollapsibleIfStatements These nested if statements could be combined 3 225–231

fr/paris/lutece/plugins/extend/service/converter/ExtenderStringMapper.java

Rule Violation Priority Line
MissingBreakInSwitch A switch statement does not contain a break 3 74–98

fr/paris/lutece/plugins/extend/service/extender/IResourceExtenderService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 58–332
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 236–237

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderCacheService.java

Rule Violation Priority Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the ResourceExtenderCacheService constructor if you want a default access modifier 3 49–52
CallSuperInConstructor It is a good practice to call super() in a constructor 3 49–52
ConstructorCallsOverridableMethod Overridable method 'getName' called during object construction 1 51

fr/paris/lutece/plugins/extend/service/extender/ResourceExtenderService.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 68–565
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 292
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 297
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 371
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 371
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 400–401
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 536
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 536
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 540
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 540

fr/paris/lutece/plugins/extend/service/extender/config/ResourceExtenderConfigService.java

Rule Violation Priority Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 170

fr/paris/lutece/plugins/extend/service/extender/facade/ExtenderType.java

Rule Violation Priority Line
DefaultPackage Use explicit scoping instead of the default package private level 3 17
ShortVariable Avoid variables with short names like _t 3 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _t field if you want a default access modifier 3 17
ImmutableField Private field '_strType' could be made final; it is only initialized in the declaration or constructor. 3 21
ShortVariable Avoid variables with short names like t 3 49
ShortVariable Avoid variables with short names like t 3 71
ControlStatementBraces This statement should have braces 3 116
ControlStatementBraces This statement should have braces 3 133
ControlStatementBraces This statement should have braces 3 151
ControlStatementBraces This statement should have braces 3 169

fr/paris/lutece/plugins/extend/service/extender/facade/IExtendableResourceResult.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3–19

fr/paris/lutece/plugins/extend/service/extender/facade/InfoExtenderException.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3–31

fr/paris/lutece/plugins/extend/service/extender/facade/ResourceExtenderServiceFacade.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 16–166
ConfusingTernary Avoid if (x != y) ..; else ..; 3 160
ConfusingTernary Avoid if (x != y) ..; else ..; 3 161

fr/paris/lutece/plugins/extend/service/extender/history/IResourceExtenderHistoryService.java

Rule Violation Priority Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 112

fr/paris/lutece/plugins/extend/service/extender/history/ResourceExtenderHistoryService.java

Rule Violation Priority Line
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 102–103
ConfusingTernary Avoid if (x != y) ..; else ..; 3 111

fr/paris/lutece/plugins/extend/service/type/ExtendableResourceTypeService.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 87

fr/paris/lutece/plugins/extend/util/ExtendErrorException.java

Rule Violation Priority Line
FieldNamingConventions The final field name '_strErrorMessage' doesn't match '[a-z][a-zA-Z0-9]*' 1 44
CallSuperInConstructor It is a good practice to call super() in a constructor 3 52–55

fr/paris/lutece/plugins/extend/util/ExtendUtils.java

Rule Violation Priority Line
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 87

fr/paris/lutece/plugins/extend/util/OperatorEnum.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'OperatorEnum(int, String)': enum constructors are implicitly private 3 60–64
MissingOverride The method 'toString()' is missing an @Override annotation. 3 81–84

fr/paris/lutece/plugins/extend/web/ResourceExtenderJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–1101
ExcessiveClassLength Avoid really long classes. 3 90–1101
CyclomaticComplexity The class 'ResourceExtenderJspBean' has a total cyclomatic complexity of 89 (highest 10). 3 90–1101
ImmutableField Private field '_resourceExtenderSearchFields' could be made final; it is only initialized in the declaration or constructor. 3 163
ImmutableField Private field '_resourceTypeService' could be made final; it is only initialized in the declaration or constructor. 3 164
ImmutableField Private field '_extenderService' could be made final; it is only initialized in the declaration or constructor. 3 165
ImmutableField Private field '_extenderComponentManager' could be made final; it is only initialized in the declaration or constructor. 3 166
ImmutableField Private field '_resourceManager' could be made final; it is only initialized in the declaration or constructor. 3 167
ImmutableField Private field '_defaultResourceService' could be made final; it is only initialized in the declaration or constructor. 3 168
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 3 169
GuardLogStatement Logger calls should be surrounded by log level guards. 2 195
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 200
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 200
GuardLogStatement Logger calls should be surrounded by log level guards. 2 238
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 243
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 243
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 339
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 376
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 376
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 604
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 604
CyclomaticComplexity The method 'doCreateResourceExtender(HttpServletRequest)' has a cyclomatic complexity of 10. 3 623–689
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 681–684
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 731
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 796
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 821
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'action' 3 1036
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 1087

fr/paris/lutece/plugins/extend/web/action/CreateResourceExtenderPluginAction.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 81–82

fr/paris/lutece/plugins/extend/web/action/ModifyDefaultConfigPluginAction.java

Rule Violation Priority Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 159

fr/paris/lutece/plugins/extend/web/action/ResourceExtenderSearchFields.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 246–247

fr/paris/lutece/plugins/extend/web/component/NoConfigResourceExtenderComponent.java

Rule Violation Priority Line
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 1 65–68
EmptyMethodInAbstractClassShouldBeAbstract An empty method in an abstract class should be abstract instead 1 74–77

fr/paris/lutece/plugins/extend/web/component/ResourceExtenderComponentManager.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–395
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 206
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 206
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 235
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 279
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 319–320
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 322
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 322
CyclomaticComplexity The method 'doSaveConfig(ResourceExtenderDTO, HttpServletRequest)' has a cyclomatic complexity of 10. 3 341–394
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 352–361
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 363–391
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 373–376
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 381

fr/paris/lutece/plugins/extend/web/servlet/ExtendContent.java

Rule Violation Priority Line
IdenticalCatchBranches 'catch' branch identical to 'IllegalAccessException' branch 3 79–82