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/directories/util/DirectoriesConstants.java

Rule Violation Line
ClassNamingConventions The utility class name 'DirectoriesConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 41–86

fr/paris/lutece/plugins/directories/web/DoDownloadFile.java

Rule Violation Line
ClassNamingConventions The utility class name 'DoDownloadFile' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 59–122

Priority 3

fr/paris/lutece/plugins/directories/business/DirectoryEntity.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 147
ConfusingTernary Avoid if (x != y) ..; else ..; 156

fr/paris/lutece/plugins/directories/service/EntryService.java

Rule Violation Line
GodClass Possible God Class (WMC=56, ATFD=115, TCC=12.088%) 62–523
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 97–118
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 104
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntryReadOnly' should not return void linguistically 130–153
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 137
CyclomaticComplexity The method 'moveDownEntryOrder(int, Entry)' has a cyclomatic complexity of 16. 225–306
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 246–276
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 316–379
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 335–362
LinguisticNaming Linguistics Antipattern - The getter 'getEntryFields' should not return void linguistically 509–521
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 516

fr/paris/lutece/plugins/directories/service/EntryTypeService.java

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 69–72

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeImage.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 113

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeMyLuteceUserPicker.java

Rule Violation Line
CyclomaticComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a cyclomatic complexity of 12. 104–213
NPathComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has an NPath complexity of 864 104–213
ExcessiveMethodLength Avoid really long methods. 104–213
NcssCount The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a NCSS line count of 63. 104–213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 107
ConfusingTernary Avoid if (x != y) ..; else ..; 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 117
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 118
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 119
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 120
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 121
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 122
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 124
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 125
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 233
CyclomaticComplexity The method 'checkEntryErrors(Entry, Field, String, String, List, boolean, Locale)' has a cyclomatic complexity of 13. 270–327

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeRadioButton.java

Rule Violation Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 107
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 108
ConfusingTernary Avoid if (x != y) ..; else ..; 108
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 113
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 116

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeSelect.java

Rule Violation Line
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 125–128

fr/paris/lutece/plugins/directories/web/AbstractDirectoriesManagerJspBean.java

Rule Violation Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 68

fr/paris/lutece/plugins/directories/web/DirectoriesApp.java

Rule Violation Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 82
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 125

fr/paris/lutece/plugins/directories/web/DirectoryEntriesJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–470
ImmutableField Private field '_entryService' could be made final; it is only initialized in the declaration or constructor. 105
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 114
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 135–150
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 179
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 201–250
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 267
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 289
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 298–301
ConfusingTernary Avoid if (x != y) ..; else ..; 308–315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 308–315
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 410

fr/paris/lutece/plugins/directories/web/DirectoryFieldsJspBean.java

Rule Violation Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 131
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 139
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 202
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 284
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 285
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 286
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 351

fr/paris/lutece/plugins/directories/web/DirectoryJspBean.java

Rule Violation Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 110
ConfusingTernary Avoid if (x != y) ..; else ..; 127

fr/paris/lutece/plugins/directories/web/DirectoryResponseJspBean.java

Rule Violation Line
AddEmptyString Do not add empty strings 170

fr/paris/lutece/plugins/directories/web/DoDownloadFile.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 95
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 96–117
ShortVariable Avoid variables with short names like os 109

Priority 4

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeSelect.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.directories.util.DirectoriesConstants' 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError' 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.MandatoryError' 42
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils' 44
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' 45
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessage' 46
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessageService' 47
UnusedImports Avoid unused imports such as 'org.apache.commons.lang.StringUtils' 49
UnusedImports Avoid unused imports such as 'java.util.List' 51

Files

fr/paris/lutece/plugins/directories/business/DirectoryEntity.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 147
ConfusingTernary Avoid if (x != y) ..; else ..; 3 156

fr/paris/lutece/plugins/directories/service/EntryService.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=56, ATFD=115, TCC=12.088%) 3 62–523
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntry' should not return void linguistically 3 97–118
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 104
LinguisticNaming Linguistics Antipattern - The getter 'getHtmlEntryReadOnly' should not return void linguistically 3 130–153
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 137
CyclomaticComplexity The method 'moveDownEntryOrder(int, Entry)' has a cyclomatic complexity of 16. 3 225–306
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 246–276
CyclomaticComplexity The method 'moveUpEntryOrder(int, Entry)' has a cyclomatic complexity of 13. 3 316–379
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 335–362
LinguisticNaming Linguistics Antipattern - The getter 'getEntryFields' should not return void linguistically 3 509–521
AvoidReassigningLoopVariables Avoid reassigning the loop control variable 'field' 3 516

fr/paris/lutece/plugins/directories/service/EntryTypeService.java

Rule Violation Priority Line
NonThreadSafeSingleton Singleton is not thread safe 3 69–72

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeImage.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 113

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeMyLuteceUserPicker.java

Rule Violation Priority Line
CyclomaticComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a cyclomatic complexity of 12. 3 104–213
NPathComplexity The method 'getRequestData(Entry, HttpServletRequest, Locale)' has an NPath complexity of 864 3 104–213
ExcessiveMethodLength Avoid really long methods. 3 104–213
NcssCount The method 'getRequestData(Entry, HttpServletRequest, Locale)' has a NCSS line count of 63. 3 104–213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 107
ConfusingTernary Avoid if (x != y) ..; else ..; 3 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 117
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 118
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 119
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 120
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 121
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 122
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 124
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 125
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 233
CyclomaticComplexity The method 'checkEntryErrors(Entry, Field, String, String, List, boolean, Locale)' has a cyclomatic complexity of 13. 3 270–327

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeRadioButton.java

Rule Violation Priority Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 107
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 108
ConfusingTernary Avoid if (x != y) ..; else ..; 3 108
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 109
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 110
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 111
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 112
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 113
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 114
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 116

fr/paris/lutece/plugins/directories/service/entrytype/EntryTypeSelect.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.directories.util.DirectoriesConstants' 4 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.GenericAttributeError' 4 41
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.business.MandatoryError' 4 42
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.genericattributes.util.GenericAttributesUtils' 4 44
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' 4 45
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessage' 4 46
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.message.AdminMessageService' 4 47
UnusedImports Avoid unused imports such as 'org.apache.commons.lang.StringUtils' 4 49
UnusedImports Avoid unused imports such as 'java.util.List' 4 51
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 125–128

fr/paris/lutece/plugins/directories/util/DirectoriesConstants.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'DirectoriesConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 41–86

fr/paris/lutece/plugins/directories/web/AbstractDirectoriesManagerJspBean.java

Rule Violation Priority Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 68

fr/paris/lutece/plugins/directories/web/DirectoriesApp.java

Rule Violation Priority Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 82
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 125

fr/paris/lutece/plugins/directories/web/DirectoryEntriesJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–470
ImmutableField Private field '_entryService' could be made final; it is only initialized in the declaration or constructor. 3 105
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 114
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 135–150
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 179
CyclomaticComplexity The method 'doCreateEntry(HttpServletRequest)' has a cyclomatic complexity of 11. 3 201–250
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 267
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 289
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 298–301
ConfusingTernary Avoid if (x != y) ..; else ..; 3 308–315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 308–315
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 410

fr/paris/lutece/plugins/directories/web/DirectoryFieldsJspBean.java

Rule Violation Priority Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 131
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 139
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 202
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 284
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 285
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 286
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 351

fr/paris/lutece/plugins/directories/web/DirectoryJspBean.java

Rule Violation Priority Line
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 110
ConfusingTernary Avoid if (x != y) ..; else ..; 3 127

fr/paris/lutece/plugins/directories/web/DirectoryResponseJspBean.java

Rule Violation Priority Line
AddEmptyString Do not add empty strings 3 170

fr/paris/lutece/plugins/directories/web/DoDownloadFile.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'DoDownloadFile' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 59–122
ConfusingTernary Avoid if (x != y) ..; else ..; 3 95
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 96–117
ShortVariable Avoid variables with short names like os 3 109