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/favorite/util/constants/FavoriteConstants.java

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

Priority 2

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteListenerService.java

Rule Violation Line
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 137

fr/paris/lutece/plugins/extend/modules/favorite/web/component/FavoriteResourceExtenderComponent.java

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

Priority 3

fr/paris/lutece/plugins/extend/modules/favorite/business/FavoriteDAO.java

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

fr/paris/lutece/plugins/extend/modules/favorite/business/FavoriteFilter.java

Rule Violation Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 245

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteAddOnService.java

Rule Violation Line
UnnecessaryReturn Avoid unnecessary return statements 75

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteListenerService.java

Rule Violation Line
ImportFromSamePackage No need to import a type that lives in the same package 43
CommentRequired Header comments are required 46143
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. 47143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 49
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 49
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 6171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 66
CommentRequired Public method and constructor comments are required 129141
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 132

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteService.java

Rule Violation Line
ImportFromSamePackage No need to import a type that lives in the same package 42
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 96125
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 132163
AddEmptyString Do not add empty strings 160

fr/paris/lutece/plugins/extend/modules/favorite/service/extender/FavoriteResourceExtender.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as '_favoriteService'. 56
UncommentedEmptyMethodBody Document empty method body 8687
UncommentedEmptyMethodBody Document empty method body 9495

fr/paris/lutece/plugins/extend/modules/favorite/service/validator/FavoriteValidationManagementService.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. 4777

fr/paris/lutece/plugins/extend/modules/favorite/web/FavoriteJspBean.java

Rule Violation Line
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 78
ImmutableField Private field '_favoriteService' could be made final; it is only initialized in the declaration or constructor. 79
CyclomaticComplexity The method 'doFavorite(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 13. 96192
NPathComplexity The method 'doFavorite(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 360 96192
ConfusingTernary Avoid if (x != y) ..; else ..; 116134
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 159
ConfusingTernary Avoid if (x != y) ..; else ..; 228246

fr/paris/lutece/plugins/extend/modules/favorite/web/action/FavoriteInstallerPluginAction.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 7475

fr/paris/lutece/plugins/extend/modules/favorite/web/component/FavoriteResourceExtenderComponent.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 105
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 105
ConfusingTernary Avoid if (x != y) ..; else ..; 111121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 139
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 139
UncommentedEmptyMethodBody Document empty method body 221222

Priority 4

fr/paris/lutece/plugins/extend/modules/favorite/service/IFavoriteListener.java

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

fr/paris/lutece/plugins/extend/modules/favorite/web/component/FavoriteResourceExtenderComponent.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.favorite.business.FavoriteFilter' 41

Files

fr/paris/lutece/plugins/extend/modules/favorite/business/FavoriteDAO.java

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

fr/paris/lutece/plugins/extend/modules/favorite/business/FavoriteFilter.java

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

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteAddOnService.java

Rule Violation Priority Line
UnnecessaryReturn Avoid unnecessary return statements 3 75

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteListenerService.java

Rule Violation Priority Line
ImportFromSamePackage No need to import a type that lives in the same package 3 43
CommentRequired Header comments are required 3 46143
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 47143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 49
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 49
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 6171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 66
CommentRequired Public method and constructor comments are required 3 129141
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 132
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 137

fr/paris/lutece/plugins/extend/modules/favorite/service/FavoriteService.java

Rule Violation Priority Line
ImportFromSamePackage No need to import a type that lives in the same package 3 42
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 96125
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 132163
AddEmptyString Do not add empty strings 3 160

fr/paris/lutece/plugins/extend/modules/favorite/service/IFavoriteListener.java

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

fr/paris/lutece/plugins/extend/modules/favorite/service/extender/FavoriteResourceExtender.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as '_favoriteService'. 3 56
UncommentedEmptyMethodBody Document empty method body 3 8687
UncommentedEmptyMethodBody Document empty method body 3 9495

fr/paris/lutece/plugins/extend/modules/favorite/service/validator/FavoriteValidationManagementService.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 4777

fr/paris/lutece/plugins/extend/modules/favorite/util/constants/FavoriteConstants.java

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

fr/paris/lutece/plugins/extend/modules/favorite/web/FavoriteJspBean.java

Rule Violation Priority Line
ImmutableField Private field '_resourceExtenderHistoryService' could be made final; it is only initialized in the declaration or constructor. 3 78
ImmutableField Private field '_favoriteService' could be made final; it is only initialized in the declaration or constructor. 3 79
CyclomaticComplexity The method 'doFavorite(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 13. 3 96192
NPathComplexity The method 'doFavorite(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 360 3 96192
ConfusingTernary Avoid if (x != y) ..; else ..; 3 116134
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 159
ConfusingTernary Avoid if (x != y) ..; else ..; 3 228246

fr/paris/lutece/plugins/extend/modules/favorite/web/action/FavoriteInstallerPluginAction.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 7475

fr/paris/lutece/plugins/extend/modules/favorite/web/component/FavoriteResourceExtenderComponent.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.favorite.business.FavoriteFilter' 4 41
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 105
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 105
ConfusingTernary Avoid if (x != y) ..; else ..; 3 111121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 139
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 139
GuardLogStatement Logger calls should be surrounded by log level guards. 2 171
UncommentedEmptyMethodBody Document empty method body 3 221222