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/openam/authentication/OpenamUser.java

Rule Violation Ligne
FieldNamingConventions The field name 'ROLE_VERIFIED' doesn't match '_[a-z][a-zA-Z0-9]*' 48

fr/paris/lutece/plugins/mylutece/modules/openam/service/Constants.java

Rule Violation Ligne
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 3947

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPIService.java

Rule Violation Ligne
FieldNamingConventions The constant name '_authenticateAPI' doesn't match '[A-Z][A-Z_0-9]*' 69
FieldNamingConventions The constant name '_sessionAPI' doesn't match '[A-Z][A-Z_0-9]*' 70
FieldNamingConventions The constant name '_usersAPI' doesn't match '[A-Z][A-Z_0-9]*' 71

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamLuteceUserSession.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_strIdSession' doesn't match '[a-z][a-zA-Z0-9]*' 54
FormalParameterNamingConventions The method parameter name '_strLuteceUserName' doesn't match '[a-z][a-zA-Z0-9]*' 64
FormalParameterNamingConventions The method parameter name '_bUpToDate' doesn't match '[a-z][a-zA-Z0-9]*' 74

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamService.java

Rule Violation Ligne
FieldNamingConventions The static field name 'COOKIE_OPENAM_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' 75
FieldNamingConventions The static field name 'COOKIE_OPENAM_DOMAIN' doesn't match '_[a-z][a-zA-Z0-9]*' 76
FieldNamingConventions The static field name 'COOKIE_OPENAM_PATH' doesn't match '_[a-z][a-zA-Z0-9]*' 77
FieldNamingConventions The static field name 'COOKIE_OPENAM_MAX_AGE' doesn't match '_[a-z][a-zA-Z0-9]*' 78
FieldNamingConventions The static field name 'COOKIE_OPENAM_SECURE' doesn't match '_[a-z][a-zA-Z0-9]*' 79
FieldNamingConventions The static field name 'ATTRIBUTE_USER_MAPPING' doesn't match '_[a-z][a-zA-Z0-9]*' 81
FieldNamingConventions The static field name 'ATTRIBUTE_USER_KEY_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' 82

fr/paris/lutece/plugins/mylutece/modules/openam/web/OpenamErrorJsonResponse.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_strToken' doesn't match '[a-z][a-zA-Z0-9]*' 74

Priority 2

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPI.java

Rule Violation Ligne
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 53
GuardLogStatement Logger calls should be surrounded by log level guards. 210

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPIService.java

Rule Violation Ligne
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 126

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamService.java

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 315
GuardLogStatement Logger calls should be surrounded by log level guards. 469
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 480

Priority 3

fr/paris/lutece/plugins/mylutece/modules/openam/authentication/OpenamAuthentication.java

Rule Violation Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 8284
UncommentedEmptyConstructor Document empty constructor 8284
CallSuperInConstructor It is a good practice to call super() in a constructor 8284
CyclomaticComplexity The method 'login(String, String, HttpServletRequest)' has a cyclomatic complexity of 11. 124176
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 155
ShortVariable Avoid variables with short names like ex 158
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 159

fr/paris/lutece/plugins/mylutece/modules/openam/listener/OpenamLuteceUserSessionListener.java

Rule Violation Ligne
UncommentedEmptyMethodBody Document empty method body 5253

fr/paris/lutece/plugins/mylutece/modules/openam/service/IIdentityProviderService.java

Rule Violation Ligne
UnnecessaryModifier Unnecessary modifier 'public' on method 'getIdentityInformations': the method is declared in an interface type 54

fr/paris/lutece/plugins/mylutece/modules/openam/service/IOpenamLuteceUserSessionService.java

Rule Violation Ligne
CommentRequired Header comments are required 3645
CommentRequired Public method and constructor comments are required 38
CommentRequired Public method and constructor comments are required 40
CommentRequired Public method and constructor comments are required 42
CommentRequired Public method and constructor comments are required 44

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPI.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as 'KEY_ERROR_MSG'. 52
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 223

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPIService.java

Rule Violation Ligne
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 91
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 91
ShortVariable Avoid variables with short names like jo 99
LinguisticNaming Linguistics Antipattern - The method 'isValidate' indicates linguistically it returns a boolean, but it returns 'String' 116132
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 118
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 118
ShortVariable Avoid variables with short names like jo 122
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 143
ShortVariable Avoid variables with short names like jo 151
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 168169
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 171
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 174
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 174
ShortVariable Avoid variables with short names like jo 178

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAuthenticationAgentException.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 4548
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 4548

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamLuteceUserSession.java

Rule Violation Ligne
CommentRequired Header comments are required 3678
CommentRequired Public method and constructor comments are required 4247
CommentRequired Public method and constructor comments are required 4952
CommentRequired Public method and constructor comments are required 5457
CommentRequired Public method and constructor comments are required 5962
CommentRequired Public method and constructor comments are required 6467
CommentRequired Public method and constructor comments are required 6972
CommentRequired Public method and constructor comments are required 7477

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamLuteceUserSessionService.java

Rule Violation Ligne
CommentRequired Header comments are required 43119
CommentRequired Public method and constructor comments are required 5060
NonThreadSafeSingleton Singleton is not thread safe 5257
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 55
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 56
MissingOverride The method 'isLuteceUserUpToDate(String)' is missing an @Override annotation. 6272
CommentRequired Public method and constructor comments are required 6272
CommentRequired Public method and constructor comments are required 7483
MissingOverride The method 'addLuteceUserSession(String, String)' is missing an @Override annotation. 7483
CommentRequired Public method and constructor comments are required 85102
MissingOverride The method 'removeLuteceUserSession(String)' is missing an @Override annotation. 85102
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 9699
CommentRequired Public method and constructor comments are required 104118
MissingOverride The method 'notifyLuteceUserUpdating(String)' is missing an @Override annotation. 104118

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamService.java

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 99133
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 111
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 118131
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 122130
ConfusingTernary Avoid if (x != y) ..; else ..; 147154
CyclomaticComplexity The method 'doLogin(HttpServletRequest, String, String, OpenamAuthentication)' has a cyclomatic complexity of 10. 170219
CyclomaticComplexity The method 'getHttpAuthenticatedUser(HttpServletRequest, OpenamAuthentication)' has a cyclomatic complexity of 10. 248294
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 446
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 446
CommentRequired Public method and constructor comments are required 476484

fr/paris/lutece/plugins/mylutece/modules/openam/web/MyLuteceOpenamXPage.java

Rule Violation Ligne
ImmutableField Private field '_openAmAuthentication' could be made final; it is only initialized in the declaration or constructor. 79
LinguisticNaming Linguistics Antipattern - The method 'isUserAuthenticated' indicates linguistically it returns a boolean, but it returns 'String' 88113
ConfusingTernary Avoid if (x != y) ..; else ..; 98105
IdenticalCatchBranches 'catch' branch identical to 'LoginException' branch 152156

fr/paris/lutece/plugins/mylutece/modules/openam/web/OpenamErrorJsonResponse.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 4851
CommentRequired Public method and constructor comments are required 5357

fr/paris/lutece/plugins/mylutece/modules/openam/web/OpenamLuteceFilter.java

Rule Violation Ligne
CyclomaticComplexity The method 'doFilter(ServletRequest, ServletResponse, FilterChain)' has a cyclomatic complexity of 10. 78130
ConfusingTernary Avoid if (x != y) ..; else ..; 88102
ConfusingTernary Avoid if (x != y) ..; else ..; 109126

Priority 4

fr/paris/lutece/plugins/mylutece/modules/openam/authentication/OpenamAuthentication.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.lang.UnsupportedOperationException' due to existing implicit import 'java.lang.*' 198

fr/paris/lutece/plugins/mylutece/modules/openam/listener/OpenamLuteceUserSessionListener.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.security.LuteceUser' 37

Fichiers

fr/paris/lutece/plugins/mylutece/modules/openam/authentication/OpenamAuthentication.java

Rule Violation Priority Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 8284
UncommentedEmptyConstructor Document empty constructor 3 8284
CallSuperInConstructor It is a good practice to call super() in a constructor 3 8284
CyclomaticComplexity The method 'login(String, String, HttpServletRequest)' has a cyclomatic complexity of 11. 3 124176
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 155
ShortVariable Avoid variables with short names like ex 3 158
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 159
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.lang.UnsupportedOperationException' due to existing implicit import 'java.lang.*' 4 198

fr/paris/lutece/plugins/mylutece/modules/openam/authentication/OpenamUser.java

Rule Violation Priority Ligne
FieldNamingConventions The field name 'ROLE_VERIFIED' doesn't match '_[a-z][a-zA-Z0-9]*' 1 48

fr/paris/lutece/plugins/mylutece/modules/openam/listener/OpenamLuteceUserSessionListener.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.security.LuteceUser' 4 37
UncommentedEmptyMethodBody Document empty method body 3 5253

fr/paris/lutece/plugins/mylutece/modules/openam/service/Constants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3947

fr/paris/lutece/plugins/mylutece/modules/openam/service/IIdentityProviderService.java

Rule Violation Priority Ligne
UnnecessaryModifier Unnecessary modifier 'public' on method 'getIdentityInformations': the method is declared in an interface type 3 54

fr/paris/lutece/plugins/mylutece/modules/openam/service/IOpenamLuteceUserSessionService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3645
CommentRequired Public method and constructor comments are required 3 38
CommentRequired Public method and constructor comments are required 3 40
CommentRequired Public method and constructor comments are required 3 42
CommentRequired Public method and constructor comments are required 3 44

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPI.java

Rule Violation Priority Ligne
UnusedPrivateField Avoid unused private fields such as 'KEY_ERROR_MSG'. 3 52
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 2 53
GuardLogStatement Logger calls should be surrounded by log level guards. 2 210
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 223

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAPIService.java

Rule Violation Priority Ligne
FieldNamingConventions The constant name '_authenticateAPI' doesn't match '[A-Z][A-Z_0-9]*' 1 69
FieldNamingConventions The constant name '_sessionAPI' doesn't match '[A-Z][A-Z_0-9]*' 1 70
FieldNamingConventions The constant name '_usersAPI' doesn't match '[A-Z][A-Z_0-9]*' 1 71
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 91
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 91
ShortVariable Avoid variables with short names like jo 3 99
LinguisticNaming Linguistics Antipattern - The method 'isValidate' indicates linguistically it returns a boolean, but it returns 'String' 3 116132
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 118
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 118
ShortVariable Avoid variables with short names like jo 3 122
BooleanInstantiation Avoid instantiating Boolean objects; reference Boolean.TRUE or Boolean.FALSE or call Boolean.valueOf() instead. 2 126
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 143
ShortVariable Avoid variables with short names like jo 3 151
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 168169
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 171
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 174
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 174
ShortVariable Avoid variables with short names like jo 3 178

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamAuthenticationAgentException.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 4548
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 4548

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamLuteceUserSession.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3678
CommentRequired Public method and constructor comments are required 3 4247
CommentRequired Public method and constructor comments are required 3 4952
FormalParameterNamingConventions The method parameter name '_strIdSession' doesn't match '[a-z][a-zA-Z0-9]*' 1 54
CommentRequired Public method and constructor comments are required 3 5457
CommentRequired Public method and constructor comments are required 3 5962
CommentRequired Public method and constructor comments are required 3 6467
FormalParameterNamingConventions The method parameter name '_strLuteceUserName' doesn't match '[a-z][a-zA-Z0-9]*' 1 64
CommentRequired Public method and constructor comments are required 3 6972
FormalParameterNamingConventions The method parameter name '_bUpToDate' doesn't match '[a-z][a-zA-Z0-9]*' 1 74
CommentRequired Public method and constructor comments are required 3 7477

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamLuteceUserSessionService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 43119
CommentRequired Public method and constructor comments are required 3 5060
NonThreadSafeSingleton Singleton is not thread safe 3 5257
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 55
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 56
MissingOverride The method 'isLuteceUserUpToDate(String)' is missing an @Override annotation. 3 6272
CommentRequired Public method and constructor comments are required 3 6272
CommentRequired Public method and constructor comments are required 3 7483
MissingOverride The method 'addLuteceUserSession(String, String)' is missing an @Override annotation. 3 7483
CommentRequired Public method and constructor comments are required 3 85102
MissingOverride The method 'removeLuteceUserSession(String)' is missing an @Override annotation. 3 85102
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 9699
CommentRequired Public method and constructor comments are required 3 104118
MissingOverride The method 'notifyLuteceUserUpdating(String)' is missing an @Override annotation. 3 104118

fr/paris/lutece/plugins/mylutece/modules/openam/service/OpenamService.java

Rule Violation Priority Ligne
FieldNamingConventions The static field name 'COOKIE_OPENAM_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' 1 75
FieldNamingConventions The static field name 'COOKIE_OPENAM_DOMAIN' doesn't match '_[a-z][a-zA-Z0-9]*' 1 76
FieldNamingConventions The static field name 'COOKIE_OPENAM_PATH' doesn't match '_[a-z][a-zA-Z0-9]*' 1 77
FieldNamingConventions The static field name 'COOKIE_OPENAM_MAX_AGE' doesn't match '_[a-z][a-zA-Z0-9]*' 1 78
FieldNamingConventions The static field name 'COOKIE_OPENAM_SECURE' doesn't match '_[a-z][a-zA-Z0-9]*' 1 79
FieldNamingConventions The static field name 'ATTRIBUTE_USER_MAPPING' doesn't match '_[a-z][a-zA-Z0-9]*' 1 81
FieldNamingConventions The static field name 'ATTRIBUTE_USER_KEY_NAME' doesn't match '_[a-z][a-zA-Z0-9]*' 1 82
NonThreadSafeSingleton Singleton is not thread safe 3 99133
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 111
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 118131
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 122130
ConfusingTernary Avoid if (x != y) ..; else ..; 3 147154
CyclomaticComplexity The method 'doLogin(HttpServletRequest, String, String, OpenamAuthentication)' has a cyclomatic complexity of 10. 3 170219
CyclomaticComplexity The method 'getHttpAuthenticatedUser(HttpServletRequest, OpenamAuthentication)' has a cyclomatic complexity of 10. 3 248294
GuardLogStatement Logger calls should be surrounded by log level guards. 2 315
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 446
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 446
GuardLogStatement Logger calls should be surrounded by log level guards. 2 469
CommentRequired Public method and constructor comments are required 3 476484
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 480

fr/paris/lutece/plugins/mylutece/modules/openam/web/MyLuteceOpenamXPage.java

Rule Violation Priority Ligne
ImmutableField Private field '_openAmAuthentication' could be made final; it is only initialized in the declaration or constructor. 3 79
LinguisticNaming Linguistics Antipattern - The method 'isUserAuthenticated' indicates linguistically it returns a boolean, but it returns 'String' 3 88113
ConfusingTernary Avoid if (x != y) ..; else ..; 3 98105
IdenticalCatchBranches 'catch' branch identical to 'LoginException' branch 3 152156

fr/paris/lutece/plugins/mylutece/modules/openam/web/OpenamErrorJsonResponse.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 4851
CommentRequired Public method and constructor comments are required 3 5357
FormalParameterNamingConventions The method parameter name '_strToken' doesn't match '[a-z][a-zA-Z0-9]*' 1 74

fr/paris/lutece/plugins/mylutece/modules/openam/web/OpenamLuteceFilter.java

Rule Violation Priority Ligne
CyclomaticComplexity The method 'doFilter(ServletRequest, ServletResponse, FilterChain)' has a cyclomatic complexity of 10. 3 78130
ConfusingTernary Avoid if (x != y) ..; else ..; 3 88102
ConfusingTernary Avoid if (x != y) ..; else ..; 3 109126