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/identitydesk/business/LocalAttributeDto.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 44233
FieldNamingConventions The field name 'name' doesn't match '_[a-z][a-zA-Z0-9]*' 47
FieldNamingConventions The field name 'description' doesn't match '_[a-z][a-zA-Z0-9]*' 48
FieldNamingConventions The field name 'value' doesn't match '_[a-z][a-zA-Z0-9]*' 49
FieldNamingConventions The field name 'certifier' doesn't match '_[a-z][a-zA-Z0-9]*' 50
FieldNamingConventions The field name 'certificationLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 51
FieldNamingConventions The field name 'certificationDate' doesn't match '_[a-z][a-zA-Z0-9]*' 52
FieldNamingConventions The field name 'mandatory' doesn't match '_[a-z][a-zA-Z0-9]*' 53
FieldNamingConventions The field name 'allowedCertificationList' doesn't match '_[a-z][a-zA-Z0-9]*' 54

fr/paris/lutece/plugins/identitydesk/business/LocalIdentityDto.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 46105

fr/paris/lutece/plugins/identitydesk/cache/ServiceContractCache.java

Rule Violation Line
FieldNamingConventions The final field name '_currentClientCode' doesn't match '[a-z][a-zA-Z0-9]*' 53
FieldNamingConventions The final field name '_serviceContractService' doesn't match '[a-z][a-zA-Z0-9]*' 55
FieldNamingConventions The final field name '_sortedAttributeKeyList' doesn't match '[a-z][a-zA-Z0-9]*' 56

fr/paris/lutece/plugins/identitydesk/cache/ServiceReferentialCache.java

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

fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java

Rule Violation Line
FieldNamingConventions The constant name '_serviceContractCache' doesn't match '[A-Z][A-Z_0-9]*' 157
FieldNamingConventions The constant name '_serviceReferentialCache' doesn't match '[A-Z][A-Z_0-9]*' 158
FieldNamingConventions The final field name '_identityService' doesn't match '[a-z][a-zA-Z0-9]*' 171
FieldNamingConventions The final field name '_autocompleteCityEndpoint' doesn't match '[a-z][a-zA-Z0-9]*' 172
FieldNamingConventions The final field name '_autocompleteCountryEndpoint' doesn't match '[a-z][a-zA-Z0-9]*' 173
FieldNamingConventions The final field name '_searchRules' doesn't match '[a-z][a-zA-Z0-9]*' 174
FieldNamingConventions The final field name '_searchAttributeKeyStrictList' doesn't match '[a-z][a-zA-Z0-9]*' 179
FieldNamingConventions The final field name '_AttributeInfoKeyList' doesn't match '[a-z][a-zA-Z0-9]*' 184

Priority 2

fr/paris/lutece/plugins/identitydesk/cache/ServiceContractCache.java

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

fr/paris/lutece/plugins/identitydesk/cache/ServiceReferentialCache.java

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

Priority 3

fr/paris/lutece/plugins/identitydesk/business/LocalAttributeDto.java

Rule Violation Line
DataClass The class 'LocalAttributeDto' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=12, WMC=22) 44233
CommentRequired Header comments are required 44233
ImmutableField Private field 'name' could be made final; it is only initialized in the declaration or constructor. 47
ImmutableField Private field 'description' could be made final; it is only initialized in the declaration or constructor. 48
ImmutableField Private field 'mandatory' could be made final; it is only initialized in the declaration or constructor. 53
ImmutableField Private field 'allowedCertificationList' could be made final; it is only initialized in the declaration or constructor. 54
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 61
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 62
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 63
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 64
CommentRequired Public method and constructor comments are required 8386
CommentRequired Public method and constructor comments are required 128131
CommentRequired Public method and constructor comments are required 138141
ControlStatementBraces This statement should have braces 213
ControlStatementBraces This statement should have braces 220
ControlStatementBraces This statement should have braces 225

fr/paris/lutece/plugins/identitydesk/business/LocalIdentityDto.java

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'lastUpdateDate'. 49
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 54
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 56

fr/paris/lutece/plugins/identitydesk/cache/ServiceContractCache.java

Rule Violation Line
CommentRequired Header comments are required 49142
CallSuperInConstructor It is a good practice to call super() in a constructor 5862
CommentRequired Public method and constructor comments are required 5862
CommentRequired Public method and constructor comments are required 6472
CommentRequired Public method and constructor comments are required 7482
CommentRequired Public method and constructor comments are required 8493
CommentRequired Public method and constructor comments are required 95102
ShortVariable Avoid variables with short names like i1 116
ShortVariable Avoid variables with short names like i2 117

fr/paris/lutece/plugins/identitydesk/cache/ServiceReferentialCache.java

Rule Violation Line
CommentRequired Header comments are required 4690
CommentRequired Public method and constructor comments are required 5155
CallSuperInConstructor It is a good practice to call super() in a constructor 5155
CommentRequired Public method and constructor comments are required 5765
AvoidDuplicateLiterals The String literal "_referential" appears 8 times in this file; the first occurrence is on line 59 59
CommentRequired Public method and constructor comments are required 6775
CommentRequired Public method and constructor comments are required 7783

fr/paris/lutece/plugins/identitydesk/rbac/AccessIdentityResource.java

Rule Violation Line
CommentRequired Header comments are required 3860

fr/paris/lutece/plugins/identitydesk/rbac/AccessIdentityResourceIdService.java

Rule Violation Line
CommentRequired Header comments are required 44102
ShortVariable Avoid variables with short names like rt 59
ShortVariable Avoid variables with short names like s 97

fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34960
GodClass Possible God Class (WMC=59, ATFD=117, TCC=29.870%) 90960
TooManyMethods This class has too many methods, consider refactoring it. 91960
ImmutableField Private field '_attributeStatuses' could be made final; it is only initialized in the declaration or constructor. 164
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _canCreateIdentity field if you want a default access modifier 168
DefaultPackage Use explicit scoping instead of the default package private level 168
RedundantFieldInitializer Avoid using redundant field initializer for '_canCreateIdentity' 168
RedundantFieldInitializer Avoid using redundant field initializer for '_canWriteIdentity' 169
DefaultPackage Use explicit scoping instead of the default package private level 169
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _canWriteIdentity field if you want a default access modifier 169
ConfusingTernary Avoid if (x != y) ..; else ..; 177
CyclomaticComplexity The method 'searchIdentitiesAndCreatePage(HttpServletRequest)' has a cyclomatic complexity of 10. 250345
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 271
ConfusingTernary Avoid if (x != y) ..; else ..; 292305
ConfusingTernary Avoid if (x != y) ..; else ..; 436449
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 478
CyclomaticComplexity The method 'doModifyIdentity(HttpServletRequest)' has a cyclomatic complexity of 10. 514575
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 532
ConfusingTernary Avoid if (x != y) ..; else ..; 557566
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 593597
NPathComplexity The method 'collectSearchAttributes(HttpServletRequest)' has an NPath complexity of 450 610670
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 631
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 632
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 657
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 691
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 692
NPathComplexity The method 'getIdentityFromRequest(HttpServletRequest, String, Boolean)' has an NPath complexity of 320 785838
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 798
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 802
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 803
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 954

fr/paris/lutece/plugins/identitydesk/web/ManageIdentitiesJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 49102
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 65
AddEmptyString Do not add empty strings 96

Files

fr/paris/lutece/plugins/identitydesk/business/LocalAttributeDto.java

Rule Violation Priority Line
DataClass The class 'LocalAttributeDto' is suspected to be a Data Class (WOC=25.000%, NOPA=0, NOAM=12, WMC=22) 3 44233
CommentRequired Header comments are required 3 44233
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 44233
FieldNamingConventions The field name 'name' doesn't match '_[a-z][a-zA-Z0-9]*' 1 47
ImmutableField Private field 'name' could be made final; it is only initialized in the declaration or constructor. 3 47
FieldNamingConventions The field name 'description' doesn't match '_[a-z][a-zA-Z0-9]*' 1 48
ImmutableField Private field 'description' could be made final; it is only initialized in the declaration or constructor. 3 48
FieldNamingConventions The field name 'value' doesn't match '_[a-z][a-zA-Z0-9]*' 1 49
FieldNamingConventions The field name 'certifier' doesn't match '_[a-z][a-zA-Z0-9]*' 1 50
FieldNamingConventions The field name 'certificationLevel' doesn't match '_[a-z][a-zA-Z0-9]*' 1 51
FieldNamingConventions The field name 'certificationDate' doesn't match '_[a-z][a-zA-Z0-9]*' 1 52
ImmutableField Private field 'mandatory' could be made final; it is only initialized in the declaration or constructor. 3 53
FieldNamingConventions The field name 'mandatory' doesn't match '_[a-z][a-zA-Z0-9]*' 1 53
ImmutableField Private field 'allowedCertificationList' could be made final; it is only initialized in the declaration or constructor. 3 54
FieldNamingConventions The field name 'allowedCertificationList' doesn't match '_[a-z][a-zA-Z0-9]*' 1 54
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 61
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 62
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 63
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 64
CommentRequired Public method and constructor comments are required 3 8386
CommentRequired Public method and constructor comments are required 3 128131
CommentRequired Public method and constructor comments are required 3 138141
ControlStatementBraces This statement should have braces 3 213
ControlStatementBraces This statement should have braces 3 220
ControlStatementBraces This statement should have braces 3 225

fr/paris/lutece/plugins/identitydesk/business/LocalIdentityDto.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 46105
UnusedPrivateField Avoid unused private fields such as 'lastUpdateDate'. 3 49
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 54
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 56

fr/paris/lutece/plugins/identitydesk/cache/ServiceContractCache.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 49142
FieldNamingConventions The final field name '_currentClientCode' doesn't match '[a-z][a-zA-Z0-9]*' 1 53
FieldNamingConventions The final field name '_serviceContractService' doesn't match '[a-z][a-zA-Z0-9]*' 1 55
FieldNamingConventions The final field name '_sortedAttributeKeyList' doesn't match '[a-z][a-zA-Z0-9]*' 1 56
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5862
CommentRequired Public method and constructor comments are required 3 5862
CommentRequired Public method and constructor comments are required 3 6472
GuardLogStatement Logger calls should be surrounded by log level guards. 2 71
CommentRequired Public method and constructor comments are required 3 7482
GuardLogStatement Logger calls should be surrounded by log level guards. 2 81
CommentRequired Public method and constructor comments are required 3 8493
CommentRequired Public method and constructor comments are required 3 95102
ShortVariable Avoid variables with short names like i1 3 116
ShortVariable Avoid variables with short names like i2 3 117

fr/paris/lutece/plugins/identitydesk/cache/ServiceReferentialCache.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 4690
FieldNamingConventions The final field name '_referentialService' doesn't match '[a-z][a-zA-Z0-9]*' 1 49
CommentRequired Public method and constructor comments are required 3 5155
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5155
CommentRequired Public method and constructor comments are required 3 5765
AvoidDuplicateLiterals The String literal "_referential" appears 8 times in this file; the first occurrence is on line 59 3 59
GuardLogStatement Logger calls should be surrounded by log level guards. 2 64
CommentRequired Public method and constructor comments are required 3 6775
GuardLogStatement Logger calls should be surrounded by log level guards. 2 74
CommentRequired Public method and constructor comments are required 3 7783

fr/paris/lutece/plugins/identitydesk/rbac/AccessIdentityResource.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3860

fr/paris/lutece/plugins/identitydesk/rbac/AccessIdentityResourceIdService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 44102
ShortVariable Avoid variables with short names like rt 3 59
ShortVariable Avoid variables with short names like s 3 97

fr/paris/lutece/plugins/identitydesk/web/IdentityJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34960
GodClass Possible God Class (WMC=59, ATFD=117, TCC=29.870%) 3 90960
TooManyMethods This class has too many methods, consider refactoring it. 3 91960
FieldNamingConventions The constant name '_serviceContractCache' doesn't match '[A-Z][A-Z_0-9]*' 1 157
FieldNamingConventions The constant name '_serviceReferentialCache' doesn't match '[A-Z][A-Z_0-9]*' 1 158
ImmutableField Private field '_attributeStatuses' could be made final; it is only initialized in the declaration or constructor. 3 164
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _canCreateIdentity field if you want a default access modifier 3 168
DefaultPackage Use explicit scoping instead of the default package private level 3 168
RedundantFieldInitializer Avoid using redundant field initializer for '_canCreateIdentity' 3 168
RedundantFieldInitializer Avoid using redundant field initializer for '_canWriteIdentity' 3 169
DefaultPackage Use explicit scoping instead of the default package private level 3 169
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _canWriteIdentity field if you want a default access modifier 3 169
FieldNamingConventions The final field name '_identityService' doesn't match '[a-z][a-zA-Z0-9]*' 1 171
FieldNamingConventions The final field name '_autocompleteCityEndpoint' doesn't match '[a-z][a-zA-Z0-9]*' 1 172
FieldNamingConventions The final field name '_autocompleteCountryEndpoint' doesn't match '[a-z][a-zA-Z0-9]*' 1 173
FieldNamingConventions The final field name '_searchRules' doesn't match '[a-z][a-zA-Z0-9]*' 1 174
ConfusingTernary Avoid if (x != y) ..; else ..; 3 177
FieldNamingConventions The final field name '_searchAttributeKeyStrictList' doesn't match '[a-z][a-zA-Z0-9]*' 1 179
FieldNamingConventions The final field name '_AttributeInfoKeyList' doesn't match '[a-z][a-zA-Z0-9]*' 1 184
CyclomaticComplexity The method 'searchIdentitiesAndCreatePage(HttpServletRequest)' has a cyclomatic complexity of 10. 3 250345
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 271
ConfusingTernary Avoid if (x != y) ..; else ..; 3 292305
ConfusingTernary Avoid if (x != y) ..; else ..; 3 436449
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 478
CyclomaticComplexity The method 'doModifyIdentity(HttpServletRequest)' has a cyclomatic complexity of 10. 3 514575
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 532
ConfusingTernary Avoid if (x != y) ..; else ..; 3 557566
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 593597
NPathComplexity The method 'collectSearchAttributes(HttpServletRequest)' has an NPath complexity of 450 3 610670
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 631
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 632
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 657
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 691
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 692
NPathComplexity The method 'getIdentityFromRequest(HttpServletRequest, String, Boolean)' has an NPath complexity of 320 3 785838
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 798
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 802
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 803
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 954

fr/paris/lutece/plugins/identitydesk/web/ManageIdentitiesJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 49102
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 65
AddEmptyString Do not add empty strings 3 96