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/follow/service/FollowListenerService.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 44–148

fr/paris/lutece/plugins/extend/modules/follow/util/constants/FollowConstants.java

Rule Violation Line
ClassNamingConventions The utility class name 'FollowConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 41–101
FieldNamingConventions The public constant name 'MARK_follow_CONFIG' doesn't match '[A-Z][A-Z_0-9]*' 71

Priority 2

fr/paris/lutece/plugins/extend/modules/follow/web/component/FollowResourceExtenderComponent.java

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

Priority 3

fr/paris/lutece/plugins/extend/modules/follow/business/FollowDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 86–101
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 223

fr/paris/lutece/plugins/extend/modules/follow/business/FollowFilter.java

Rule Violation Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 246

fr/paris/lutece/plugins/extend/modules/follow/service/FollowAddOnService.java

Rule Violation Line
UnnecessaryReturn Avoid unnecessary return statements 76

fr/paris/lutece/plugins/extend/modules/follow/service/FollowListenerService.java

Rule Violation Line
CommentRequired Header comments are required 44–148
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 47
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 65–75
CommentRequired Public method and constructor comments are required 133–146

fr/paris/lutece/plugins/extend/modules/follow/service/FollowService.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 99–128
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 135–166
AddEmptyString Do not add empty strings 163

fr/paris/lutece/plugins/extend/modules/follow/service/extender/FollowResourceExtender.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as '_followService'. 61

fr/paris/lutece/plugins/extend/modules/follow/service/validator/FollowValidationManagementService.java

Rule Violation Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 48–78

fr/paris/lutece/plugins/extend/modules/follow/web/FollowJspBean.java

Rule Violation Line
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 80
ImmutableField Private field '_followService' could be made final; it is only initialized in the declaration or constructor. 81
ExcessiveMethodLength Avoid really long methods. 97–197
NPathComplexity The method 'doFollow(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 720 97–197
CyclomaticComplexity The method 'doFollow(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 15. 97–197
ConfusingTernary Avoid if (x != y) ..; else ..; 117–135
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 164
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 216
ConfusingTernary Avoid if (x != y) ..; else ..; 238–256

fr/paris/lutece/plugins/extend/modules/follow/web/action/FollowInstallerPluginAction.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 74–75

fr/paris/lutece/plugins/extend/modules/follow/web/component/FollowResourceExtenderComponent.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–234
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 115
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 115
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 141
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 141
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 215

Priority 4

fr/paris/lutece/plugins/extend/modules/follow/service/IFollowListener.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Date' 36

fr/paris/lutece/plugins/extend/modules/follow/web/FollowJspBean.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.service.extender.config.IResourceExtenderConfigService' 45

Files

fr/paris/lutece/plugins/extend/modules/follow/business/FollowDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 86–101
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 223

fr/paris/lutece/plugins/extend/modules/follow/business/FollowFilter.java

Rule Violation Priority Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 246

fr/paris/lutece/plugins/extend/modules/follow/service/FollowAddOnService.java

Rule Violation Priority Line
UnnecessaryReturn Avoid unnecessary return statements 3 76

fr/paris/lutece/plugins/extend/modules/follow/service/FollowListenerService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 44–148
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 44–148
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 47
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 65–75
CommentRequired Public method and constructor comments are required 3 133–146

fr/paris/lutece/plugins/extend/modules/follow/service/FollowService.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 99–128
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 135–166
AddEmptyString Do not add empty strings 3 163

fr/paris/lutece/plugins/extend/modules/follow/service/IFollowListener.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Date' 4 36

fr/paris/lutece/plugins/extend/modules/follow/service/extender/FollowResourceExtender.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as '_followService'. 3 61

fr/paris/lutece/plugins/extend/modules/follow/service/validator/FollowValidationManagementService.java

Rule Violation Priority Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 48–78

fr/paris/lutece/plugins/extend/modules/follow/util/constants/FollowConstants.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'FollowConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 41–101
FieldNamingConventions The public constant name 'MARK_follow_CONFIG' doesn't match '[A-Z][A-Z_0-9]*' 1 71

fr/paris/lutece/plugins/extend/modules/follow/web/FollowJspBean.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.service.extender.config.IResourceExtenderConfigService' 4 45
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 3 80
ImmutableField Private field '_followService' could be made final; it is only initialized in the declaration or constructor. 3 81
ExcessiveMethodLength Avoid really long methods. 3 97–197
NPathComplexity The method 'doFollow(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 720 3 97–197
CyclomaticComplexity The method 'doFollow(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 15. 3 97–197
ConfusingTernary Avoid if (x != y) ..; else ..; 3 117–135
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 164
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 216
ConfusingTernary Avoid if (x != y) ..; else ..; 3 238–256

fr/paris/lutece/plugins/extend/modules/follow/web/action/FollowInstallerPluginAction.java

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

fr/paris/lutece/plugins/extend/modules/follow/web/component/FollowResourceExtenderComponent.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–234
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 115
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 115
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 141
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 141
GuardLogStatement Logger calls should be surrounded by log level guards. 2 173
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 215