Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/mylutece/modules/cas/authentication/CASAuthentication.java

Rule Violation Ligne
FieldNamingConventions The field name 'cASUserKeyService' doesn't match '_[a-z][a-zA-Z0-9]*' 107
FieldNamingConventions The field name 'ATTRIBUTE_ROLES' doesn't match '_[a-z][a-zA-Z0-9]*' 110
FieldNamingConventions The field name 'USER_MANDATORY_ATTRIBUTES' doesn't match '_[a-z][a-zA-Z0-9]*' 111
FieldNamingConventions The field name 'ROLES_ASSOCIATIONS' doesn't match '_[a-z][a-zA-Z0-9]*' 112
FieldNamingConventions The field name 'ATTRIBUTE_USER_MAPPING' doesn't match '_[a-z][a-zA-Z0-9]*' 113

fr/paris/lutece/plugins/mylutece/modules/cas/service/CASService.java

Rule Violation Ligne
FieldNamingConventions The constant name '_singleton' doesn't match '[A-Z][A-Z_0-9]*' 49

fr/paris/lutece/plugins/mylutece/modules/cas/web/LuteceCASFilter.java

Rule Violation Ligne
FieldNamingConventions The field name 'noCookieMessageKey' doesn't match '_[a-z][a-zA-Z0-9]*' 77
FieldNamingConventions The field name 'redirectAfterGateway' doesn't match '_[a-z][a-zA-Z0-9]*' 90

Priority 2

fr/paris/lutece/plugins/mylutece/modules/cas/authentication/CASAuthentication.java

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 319

Priority 3

fr/paris/lutece/plugins/mylutece/modules/cas/authentication/CASAuthentication.java

Rule Violation Ligne
GodClass Possible God Class (WMC=64, ATFD=30, TCC=1.429%) 74–598
ImmutableField Private field 'USER_MANDATORY_ATTRIBUTES' could be made final; it is only initialized in the declaration or constructor. 111
ImmutableField Private field 'ROLES_ASSOCIATIONS' could be made final; it is only initialized in the declaration or constructor. 112
ImmutableField Private field 'ATTRIBUTE_USER_MAPPING' could be made final; it is only initialized in the declaration or constructor. 113
CyclomaticComplexity The constructor 'CASAuthentication()' has a cyclomatic complexity of 10. 118–189
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 141–150
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 161–166
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 177–187
MissingOverride The method 'getAuthServiceName()' is missing an @Override annotation. 196–204
MissingOverride The method 'getAuthType(HttpServletRequest)' is missing an @Override annotation. 213–216
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 248
ShortVariable Avoid variables with short names like ex 251
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 252
MissingOverride The method 'getHttpAuthenticatedUser(HttpServletRequest)' is missing an @Override annotation. 267–281
ConfusingTernary Avoid if (x != y) ..; else ..; 302–330
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 384
MissingOverride The method 'logout(LuteceUser)' is missing an @Override annotation. 415–417
UncommentedEmptyMethodBody Document empty method body 416–417
CommentRequired Public method and constructor comments are required 419–422
MissingOverride The method 'getRolesByUser(LuteceUser)' is missing an @Override annotation. 419–422
MissingOverride The method 'getAnonymousUser()' is missing an @Override annotation. 429–432
MissingOverride The method 'isUserInRole(LuteceUser, HttpServletRequest, String)' is missing an @Override annotation. 446–467
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 457–463
MissingOverride The method 'isExternalAuthentication()' is missing an @Override annotation. 474–477
MissingOverride The method 'getName()' is missing an @Override annotation. 483–486
MissingOverride The method 'getPluginName()' is missing an @Override annotation. 492–495

fr/paris/lutece/plugins/mylutece/modules/cas/exception/CASAuthenticationException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–42

fr/paris/lutece/plugins/mylutece/modules/cas/exception/CASUserKeyEmptyException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–42

fr/paris/lutece/plugins/mylutece/modules/cas/exception/CASUserNotAuthorizedException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–42

fr/paris/lutece/plugins/mylutece/modules/cas/service/CASService.java

Rule Violation Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 76–83

fr/paris/lutece/plugins/mylutece/modules/cas/service/DefaultCASUserKeyService.java

Rule Violation Ligne
CommentRequired Header comments are required 36–46
CommentRequired Public method and constructor comments are required 42–45
MissingOverride The method 'getKey(String, Object)' is missing an @Override annotation. 42–45

fr/paris/lutece/plugins/mylutece/modules/cas/service/ICASUserKeyService.java

Rule Violation Ligne
CommentRequired Header comments are required 36–45

fr/paris/lutece/plugins/mylutece/modules/cas/web/LuteceCASFilter.java

Rule Violation Ligne
RedundantFieldInitializer Avoid using redundant field initializer for 'noCookieMessageKey' 77
RedundantFieldInitializer Avoid using redundant field initializer for 'redirectAfterGateway' 90
CyclomaticComplexity The method 'doFilter(ServletRequest, ServletResponse, FilterChain)' has a cyclomatic complexity of 10. 107–161
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 178
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 181
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 183

fr/paris/lutece/plugins/mylutece/modules/cas/web/ParameterGatewayResolver.java

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

Fichiers

fr/paris/lutece/plugins/mylutece/modules/cas/authentication/CASAuthentication.java

Rule Violation Priority Ligne
GodClass Possible God Class (WMC=64, ATFD=30, TCC=1.429%) 3 74–598
FieldNamingConventions The field name 'cASUserKeyService' doesn't match '_[a-z][a-zA-Z0-9]*' 1 107
FieldNamingConventions The field name 'ATTRIBUTE_ROLES' doesn't match '_[a-z][a-zA-Z0-9]*' 1 110
FieldNamingConventions The field name 'USER_MANDATORY_ATTRIBUTES' doesn't match '_[a-z][a-zA-Z0-9]*' 1 111
ImmutableField Private field 'USER_MANDATORY_ATTRIBUTES' could be made final; it is only initialized in the declaration or constructor. 3 111
FieldNamingConventions The field name 'ROLES_ASSOCIATIONS' doesn't match '_[a-z][a-zA-Z0-9]*' 1 112
ImmutableField Private field 'ROLES_ASSOCIATIONS' could be made final; it is only initialized in the declaration or constructor. 3 112
ImmutableField Private field 'ATTRIBUTE_USER_MAPPING' could be made final; it is only initialized in the declaration or constructor. 3 113
FieldNamingConventions The field name 'ATTRIBUTE_USER_MAPPING' doesn't match '_[a-z][a-zA-Z0-9]*' 1 113
CyclomaticComplexity The constructor 'CASAuthentication()' has a cyclomatic complexity of 10. 3 118–189
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 141–150
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 161–166
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 177–187
MissingOverride The method 'getAuthServiceName()' is missing an @Override annotation. 3 196–204
MissingOverride The method 'getAuthType(HttpServletRequest)' is missing an @Override annotation. 3 213–216
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 248
ShortVariable Avoid variables with short names like ex 3 251
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 252
MissingOverride The method 'getHttpAuthenticatedUser(HttpServletRequest)' is missing an @Override annotation. 3 267–281
ConfusingTernary Avoid if (x != y) ..; else ..; 3 302–330
GuardLogStatement Logger calls should be surrounded by log level guards. 2 319
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 384
MissingOverride The method 'logout(LuteceUser)' is missing an @Override annotation. 3 415–417
UncommentedEmptyMethodBody Document empty method body 3 416–417
CommentRequired Public method and constructor comments are required 3 419–422
MissingOverride The method 'getRolesByUser(LuteceUser)' is missing an @Override annotation. 3 419–422
MissingOverride The method 'getAnonymousUser()' is missing an @Override annotation. 3 429–432
MissingOverride The method 'isUserInRole(LuteceUser, HttpServletRequest, String)' is missing an @Override annotation. 3 446–467
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 457–463
MissingOverride The method 'isExternalAuthentication()' is missing an @Override annotation. 3 474–477
MissingOverride The method 'getName()' is missing an @Override annotation. 3 483–486
MissingOverride The method 'getPluginName()' is missing an @Override annotation. 3 492–495

fr/paris/lutece/plugins/mylutece/modules/cas/exception/CASAuthenticationException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–42

fr/paris/lutece/plugins/mylutece/modules/cas/exception/CASUserKeyEmptyException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–42

fr/paris/lutece/plugins/mylutece/modules/cas/exception/CASUserNotAuthorizedException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–42

fr/paris/lutece/plugins/mylutece/modules/cas/service/CASService.java

Rule Violation Priority Ligne
FieldNamingConventions The constant name '_singleton' doesn't match '[A-Z][A-Z_0-9]*' 1 49
ConfusingTernary Avoid if (x != y) ..; else ..; 3 76–83

fr/paris/lutece/plugins/mylutece/modules/cas/service/DefaultCASUserKeyService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–46
CommentRequired Public method and constructor comments are required 3 42–45
MissingOverride The method 'getKey(String, Object)' is missing an @Override annotation. 3 42–45

fr/paris/lutece/plugins/mylutece/modules/cas/service/ICASUserKeyService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–45

fr/paris/lutece/plugins/mylutece/modules/cas/web/LuteceCASFilter.java

Rule Violation Priority Ligne
RedundantFieldInitializer Avoid using redundant field initializer for 'noCookieMessageKey' 3 77
FieldNamingConventions The field name 'noCookieMessageKey' doesn't match '_[a-z][a-zA-Z0-9]*' 1 77
RedundantFieldInitializer Avoid using redundant field initializer for 'redirectAfterGateway' 3 90
FieldNamingConventions The field name 'redirectAfterGateway' doesn't match '_[a-z][a-zA-Z0-9]*' 1 90
CyclomaticComplexity The method 'doFilter(ServletRequest, ServletResponse, FilterChain)' has a cyclomatic complexity of 10. 3 107–161
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 178
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 181
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 183

fr/paris/lutece/plugins/mylutece/modules/cas/web/ParameterGatewayResolver.java

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