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/menus/business/CustomMenuDAO.java

Rule Violation Line
LocalVariableNamingConventions The local variable name 'MenusList' doesn't match '[a-z][a-zA-Z0-9]*' 182
LocalVariableNamingConventions The local variable name 'MenusList' doesn't match '[a-z][a-zA-Z0-9]*' 262

fr/paris/lutece/plugins/menus/business/ICustomMenuDAO.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 105
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 114
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 126

fr/paris/lutece/plugins/menus/business/ICustomMenuItemDAO.java

Rule Violation Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 141

fr/paris/lutece/plugins/menus/business/MenuItem.java

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

fr/paris/lutece/plugins/menus/business/Menus.java

Rule Violation Line
FieldNamingConventions The field name 'isActive' doesn't match '_[a-z][a-zA-Z0-9]*' 47

fr/paris/lutece/plugins/menus/web/PaginatedJspBean.java

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

fr/paris/lutece/plugins/menus/web/validator/ValidatorCustomItemForm.java

Rule Violation Line
FieldNamingConventions The final field name 'MESSAGE_TYPE_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 60
FieldNamingConventions The final field name 'MESSAGE_TYPE_NOT_VALID' doesn't match '[a-z][a-zA-Z0-9]*' 61
FieldNamingConventions The final field name 'MESSAGE_PARENT_MENU_NOT_VALID' doesn't match '[a-z][a-zA-Z0-9]*' 62
FieldNamingConventions The final field name 'MESSAGE_SUBMENU_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 63
FieldNamingConventions The final field name 'MESSAGE_URL_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 64
FieldNamingConventions The final field name 'MESSAGE_LABEL_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 65
FieldNamingConventions The final field name 'MESSAGE_DYNAMIC_PAGE_LABEL_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 66

Priority 3

fr/paris/lutece/plugins/menus/business/CustomMenu.java

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

fr/paris/lutece/plugins/menus/business/CustomMenuDAO.java

Rule Violation Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 188191
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'daoUtil': resource specifications are implicitly final 196
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 240
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'daoUtil': resource specifications are implicitly final 268
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 292
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 293
UnusedLocalVariable Avoid unused local variables such as 'criteria'. 296

fr/paris/lutece/plugins/menus/business/CustomMenuItem.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 211222
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 213

fr/paris/lutece/plugins/menus/business/MenuItem.java

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

fr/paris/lutece/plugins/menus/business/MenusDAO.java

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

fr/paris/lutece/plugins/menus/business/PageInfo.java

Rule Violation Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the PageInfo constructor if you want a default access modifier 5763
ShortVariable Avoid variables with short names like id 77

fr/paris/lutece/plugins/menus/service/CustomMenuService.java

Rule Violation Line
CommentRequired Header comments are required 49227
ConfusingTernary Avoid if (x != y) ..; else ..; 126
CyclomaticComplexity The method 'traverseItem(MenuItem, ReferenceList, String)' has a cyclomatic complexity of 10. 186210
ConfusingTernary Avoid if (x != y) ..; else ..; 195
ConfusingTernary Avoid if (x != y) ..; else ..; 196
CommentRequired Public method and constructor comments are required 212226

fr/paris/lutece/plugins/menus/service/MainTreeMenuService.java

Rule Violation Line
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 119

fr/paris/lutece/plugins/menus/web/AccessibilityAnchorMenuInclude.java

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

fr/paris/lutece/plugins/menus/web/CustomMenuInclude.java

Rule Violation Line
CyclomaticComplexity The method 'fillTemplate(Map, PageData, int, HttpServletRequest)' has a cyclomatic complexity of 11. 102183
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 139167
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 169173
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 175179
ShortVariable Avoid variables with short names like cm 196
UnusedFormalParameter Avoid unused method parameters such as 'nCurrentPageId'. 196
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 199
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 267

fr/paris/lutece/plugins/menus/web/CustomMenusJspBean.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 711052
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 217
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 218
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 394
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 481
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 512
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 557
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 587
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 682
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 712
DefaultPackage Use explicit scoping instead of the default package private level 817821
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 818821
ShortVariable Avoid variables with short names like cs 853
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 971
ControlStatementBraces This statement should have braces 989
ControlStatementBraces This statement should have braces 991
ControlStatementBraces This statement should have braces 993

fr/paris/lutece/plugins/menus/web/MainTreeMenuInclude.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'MARK_MENU_NAME'. 69
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 131
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 168

fr/paris/lutece/plugins/menus/web/MainTreeMenuIncludeAllPages.java

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

fr/paris/lutece/plugins/menus/web/MenusAdminJspBean.java

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

fr/paris/lutece/plugins/menus/web/MenusJspBean.java

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

fr/paris/lutece/plugins/menus/web/PaginatedJspBean.java

Rule Violation Line
FinalFieldCouldBeStatic This final field could be made static 57
DefaultPackage Use explicit scoping instead of the default package private level 164
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 164

fr/paris/lutece/plugins/menus/web/TreeMenuPageInclude.java

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

fr/paris/lutece/plugins/menus/web/XPageMenuInclude.java

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

fr/paris/lutece/plugins/menus/web/rs/TreeMenuPagesRest.java

Rule Violation Line
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 114
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 147
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 173
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 207
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 236

fr/paris/lutece/plugins/menus/web/validator/ValidatorCustomItemForm.java

Rule Violation Line
FinalFieldCouldBeStatic This final field could be made static 60
FinalFieldCouldBeStatic This final field could be made static 61
FinalFieldCouldBeStatic This final field could be made static 62
FinalFieldCouldBeStatic This final field could be made static 63
FinalFieldCouldBeStatic This final field could be made static 64
FinalFieldCouldBeStatic This final field could be made static 65
FinalFieldCouldBeStatic This final field could be made static 66
ImmutableField Private field '_listErrors' could be made final; it is only initialized in the declaration or constructor. 68
CyclomaticComplexity The method 'isValid(CustomMenuItem, Locale)' has a cyclomatic complexity of 14. 91155
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 95
UnusedFormalParameter Avoid unused method parameters such as 'locale'. 162
UnusedFormalParameter Avoid unused method parameters such as 'locale'. 167
UnusedFormalParameter Avoid unused method parameters such as 'locale'. 172
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 175182

Priority 4

fr/paris/lutece/plugins/menus/web/rs/TreeMenuPagesRest.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Collection' 36
UnusedImports Avoid unused imports such as 'java.util.List' 37

Files

fr/paris/lutece/plugins/menus/business/CustomMenu.java

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

fr/paris/lutece/plugins/menus/business/CustomMenuDAO.java

Rule Violation Priority Line
LocalVariableNamingConventions The local variable name 'MenusList' doesn't match '[a-z][a-zA-Z0-9]*' 1 182
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 188191
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'daoUtil': resource specifications are implicitly final 3 196
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 240
LocalVariableNamingConventions The local variable name 'MenusList' doesn't match '[a-z][a-zA-Z0-9]*' 1 262
UnnecessaryModifier Unnecessary modifier 'final' on resource specification 'daoUtil': resource specifications are implicitly final 3 268
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 292
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 293
UnusedLocalVariable Avoid unused local variables such as 'criteria'. 3 296

fr/paris/lutece/plugins/menus/business/CustomMenuItem.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 211222
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 213

fr/paris/lutece/plugins/menus/business/ICustomMenuDAO.java

Rule Violation Priority Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 105
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 114
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 126

fr/paris/lutece/plugins/menus/business/ICustomMenuItemDAO.java

Rule Violation Priority Line
FormalParameterNamingConventions The method parameter name '_plugin' doesn't match '[a-z][a-zA-Z0-9]*' 1 141

fr/paris/lutece/plugins/menus/business/MenuItem.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 49
FieldNamingConventions The final field name '_listItems' doesn't match '[a-z][a-zA-Z0-9]*' 1 49

fr/paris/lutece/plugins/menus/business/Menus.java

Rule Violation Priority Line
FieldNamingConventions The field name 'isActive' doesn't match '_[a-z][a-zA-Z0-9]*' 1 47

fr/paris/lutece/plugins/menus/business/MenusDAO.java

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

fr/paris/lutece/plugins/menus/business/PageInfo.java

Rule Violation Priority Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the PageInfo constructor if you want a default access modifier 3 5763
ShortVariable Avoid variables with short names like id 3 77

fr/paris/lutece/plugins/menus/service/CustomMenuService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 49227
ConfusingTernary Avoid if (x != y) ..; else ..; 3 126
CyclomaticComplexity The method 'traverseItem(MenuItem, ReferenceList, String)' has a cyclomatic complexity of 10. 3 186210
ConfusingTernary Avoid if (x != y) ..; else ..; 3 195
ConfusingTernary Avoid if (x != y) ..; else ..; 3 196
CommentRequired Public method and constructor comments are required 3 212226

fr/paris/lutece/plugins/menus/service/MainTreeMenuService.java

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

fr/paris/lutece/plugins/menus/web/AccessibilityAnchorMenuInclude.java

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

fr/paris/lutece/plugins/menus/web/CustomMenuInclude.java

Rule Violation Priority Line
CyclomaticComplexity The method 'fillTemplate(Map, PageData, int, HttpServletRequest)' has a cyclomatic complexity of 11. 3 102183
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 139167
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 169173
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 175179
ShortVariable Avoid variables with short names like cm 3 196
UnusedFormalParameter Avoid unused method parameters such as 'nCurrentPageId'. 3 196
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 199
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 267

fr/paris/lutece/plugins/menus/web/CustomMenusJspBean.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 711052
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 217
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 218
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 394
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 481
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 512
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 557
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 587
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 682
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 712
DefaultPackage Use explicit scoping instead of the default package private level 3 817821
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 818821
ShortVariable Avoid variables with short names like cs 3 853
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 971
ControlStatementBraces This statement should have braces 3 989
ControlStatementBraces This statement should have braces 3 991
ControlStatementBraces This statement should have braces 3 993

fr/paris/lutece/plugins/menus/web/MainTreeMenuInclude.java

Rule Violation Priority Line
UnusedPrivateField Avoid unused private fields such as 'MARK_MENU_NAME'. 3 69
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 131
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 168

fr/paris/lutece/plugins/menus/web/MainTreeMenuIncludeAllPages.java

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

fr/paris/lutece/plugins/menus/web/MenusAdminJspBean.java

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

fr/paris/lutece/plugins/menus/web/MenusJspBean.java

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

fr/paris/lutece/plugins/menus/web/PaginatedJspBean.java

Rule Violation Priority Line
FinalFieldCouldBeStatic This final field could be made static 3 57
FieldNamingConventions The final field name 'PROPERTY_SUFFIX_DEFAULT_LIST_ITEM_PER_PAGE' doesn't match '[a-z][a-zA-Z0-9]*' 1 57
DefaultPackage Use explicit scoping instead of the default package private level 3 164
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 164

fr/paris/lutece/plugins/menus/web/TreeMenuPageInclude.java

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

fr/paris/lutece/plugins/menus/web/XPageMenuInclude.java

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

fr/paris/lutece/plugins/menus/web/rs/TreeMenuPagesRest.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Collection' 4 36
UnusedImports Avoid unused imports such as 'java.util.List' 4 37
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 114
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 147
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 173
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 207
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 236

fr/paris/lutece/plugins/menus/web/validator/ValidatorCustomItemForm.java

Rule Violation Priority Line
FinalFieldCouldBeStatic This final field could be made static 3 60
FieldNamingConventions The final field name 'MESSAGE_TYPE_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 1 60
FinalFieldCouldBeStatic This final field could be made static 3 61
FieldNamingConventions The final field name 'MESSAGE_TYPE_NOT_VALID' doesn't match '[a-z][a-zA-Z0-9]*' 1 61
FinalFieldCouldBeStatic This final field could be made static 3 62
FieldNamingConventions The final field name 'MESSAGE_PARENT_MENU_NOT_VALID' doesn't match '[a-z][a-zA-Z0-9]*' 1 62
FieldNamingConventions The final field name 'MESSAGE_SUBMENU_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 1 63
FinalFieldCouldBeStatic This final field could be made static 3 63
FieldNamingConventions The final field name 'MESSAGE_URL_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 1 64
FinalFieldCouldBeStatic This final field could be made static 3 64
FinalFieldCouldBeStatic This final field could be made static 3 65
FieldNamingConventions The final field name 'MESSAGE_LABEL_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 1 65
FinalFieldCouldBeStatic This final field could be made static 3 66
FieldNamingConventions The final field name 'MESSAGE_DYNAMIC_PAGE_LABEL_NOT_EMPTY' doesn't match '[a-z][a-zA-Z0-9]*' 1 66
ImmutableField Private field '_listErrors' could be made final; it is only initialized in the declaration or constructor. 3 68
CyclomaticComplexity The method 'isValid(CustomMenuItem, Locale)' has a cyclomatic complexity of 14. 3 91155
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 95
UnusedFormalParameter Avoid unused method parameters such as 'locale'. 3 162
UnusedFormalParameter Avoid unused method parameters such as 'locale'. 3 167
UnusedFormalParameter Avoid unused method parameters such as 'locale'. 3 172
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 175182