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/saml/authentication/SAMLAuthentication.java

Rule Violation Ligne
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 203–206

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/config/ConfigProperties.java

Rule Violation Ligne
FieldNamingConventions The static field name 'instance' doesn't match '_[a-z][a-zA-Z0-9]*' 50
FieldNamingConventions The field name 'isTest' doesn't match '_[a-z][a-zA-Z0-9]*' 51

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/BootStrap.java

Rule Violation Ligne
FieldNamingConventions The static field name 'instance' doesn't match '_[a-z][a-zA-Z0-9]*' 57
FieldNamingConventions The field name 'idpMetaDataManager' doesn't match '_[a-z][a-zA-Z0-9]*' 58
FieldNamingConventions The field name 'spMetaDataManager' doesn't match '_[a-z][a-zA-Z0-9]*' 59
FieldNamingConventions The field name 'trustEngine' doesn't match '_[a-z][a-zA-Z0-9]*' 60

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLResponseManager.java

Rule Violation Ligne
FieldNamingConventions The field name 'response' doesn't match '_[a-z][a-zA-Z0-9]*' 78
ConstructorCallsOverridableMethod Overridable method 'initialize' called during object construction 87

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLTokenExtractor.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name 'SAMLResponseB64Str' doesn't match '[a-z][a-zA-Z0-9]*' 74
LocalVariableNamingConventions The local variable name 'SAMLResponseStr' doesn't match '[a-z][a-zA-Z0-9]*' 77
LocalVariableNamingConventions The local variable name 'ResponseRoot' doesn't match '[a-z][a-zA-Z0-9]*' 100

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLTokenHandler.java

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

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/MetadataManager.java

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

fr/paris/lutece/plugins/mylutece/modules/saml/service/SAMLService.java

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

Priority 2

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLAssertionChecker.java

Rule Violation Ligne
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 126–127

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/IDPMetadataManager.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'inFilePath' 74

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/MetadataManager.java

Rule Violation Ligne
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 62

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/SPMetadataManager.java

Rule Violation Ligne
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 56
AvoidReassigningParameters Avoid reassigning parameters such as 'inFilePath' 59

Priority 3

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/SAMLAuthentication.java

Rule Violation Ligne
CommentRequired Header comments are required 62–225
MissingOverride The method 'getAnonymousUser()' is missing an @Override annotation. 69–72
MissingOverride The method 'getAuthServiceName()' is missing an @Override annotation. 78–81
MissingOverride The method 'getAuthType(HttpServletRequest)' is missing an @Override annotation. 88–91
MissingOverride The method 'isUserInRole(LuteceUser, HttpServletRequest, String)' is missing an @Override annotation. 100–103
MissingOverride The method 'login(String, String, HttpServletRequest)' is missing an @Override annotation. 117–163
CyclomaticComplexity The method 'login(String, String, HttpServletRequest)' has a cyclomatic complexity of 13. 117–163
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 134
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 136–140
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 139
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 141–145
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 144
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 146–150
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 149
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 151–155
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 154
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 156–160
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 159
MissingOverride The method 'logout(LuteceUser)' is missing an @Override annotation. 169–171
UncommentedEmptyMethodBody Document empty method body 170–171
ShortVariable Avoid variables with short names like it 181
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 194
MissingOverride The method 'getRolesByUser(LuteceUser)' is missing an @Override annotation. 203–206
CommentRequired Public method and constructor comments are required 203–206
MissingOverride The method 'getName()' is missing an @Override annotation. 212–215
MissingOverride The method 'getPluginName()' is missing an @Override annotation. 221–224

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/SAMLUser.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 40–51
CommentRequired Header comments are required 40–51

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/CertificateChecker.java

Rule Violation Ligne
CommentRequired Header comments are required 49–88
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 51–87
CommentRequired Public method and constructor comments are required 51–87
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 78
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 85

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/RequiredAttributesChecker.java

Rule Violation Ligne
CommentRequired Header comments are required 49–95
CommentRequired Public method and constructor comments are required 51–94
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 51–94

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLAssertionChecker.java

Rule Violation Ligne
CommentRequired Header comments are required 48–155
CommentRequired Public method and constructor comments are required 50–67
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 50–67
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 124

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLChecker.java

Rule Violation Ligne
CommentRequired Header comments are required 41–45
UnnecessaryModifier Unnecessary modifier 'public' on method 'check': the method is declared in an interface type 43–44
CommentRequired Public method and constructor comments are required 43–44

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLResponseChecker.java

Rule Violation Ligne
CommentRequired Header comments are required 46–104
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 48–60
CommentRequired Public method and constructor comments are required 48–60

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SignatureChecker.java

Rule Violation Ligne
CommentRequired Header comments are required 55–109
CommentRequired Public method and constructor comments are required 57–108
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 57–108
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 71
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 100
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 102
IdenticalCatchBranches 'catch' branch identical to 'SecurityException' branch 102–107
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 106

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/config/ConfigProperties.java

Rule Violation Ligne
CommentRequired Header comments are required 47–176
RedundantFieldInitializer Avoid using redundant field initializer for 'instance' 50
AvoidFieldNameMatchingMethodName Field isTest has the same name as a method 51
RedundantFieldInitializer Avoid using redundant field initializer for 'isTest' 51
CallSuperInConstructor It is a good practice to call super() in a constructor 53–71
CommentRequired Protected method constructor comments are required 53–71
CommentRequired Public method and constructor comments are required 73–76
CommentRequired Public method and constructor comments are required 78–81
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 83
CommentRequired Public method and constructor comments are required 83–89
NonThreadSafeSingleton Singleton is not thread safe 85–88
CommentRequired Public method and constructor comments are required 91–99
NonThreadSafeSingleton Singleton is not thread safe 93–96
AssignmentInOperand Avoid assignments in operands 154

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/config/Constants.java

Rule Violation Ligne
CommentRequired Header comments are required 36–45
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'IDP_METADATA_FILE_PROP': the field is declared in an interface type 38
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 38
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'SP_METADATA_FILE_PROP': the field is declared in an interface type 39
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 39
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 40
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'SAML_RESPONSE_REQUEST_PARAM': the field is declared in an interface type 40
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_USER_NAME_ATTRIBUTE_NAME_PROP': the field is declared in an interface type 41
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 41
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_USER_GROUPS_ATTRIBUTE_NAME_PROP': the field is declared in an interface type 42
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 42
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_USER_ROLE_PROP': the field is declared in an interface type 43
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 43
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 44
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_CLOCK_SKEW_PROP': the field is declared in an interface type 44

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/BootStrap.java

Rule Violation Ligne
CommentRequired Header comments are required 55–159
RedundantFieldInitializer Avoid using redundant field initializer for 'instance' 57
RedundantFieldInitializer Avoid using redundant field initializer for 'idpMetaDataManager' 58
RedundantFieldInitializer Avoid using redundant field initializer for 'spMetaDataManager' 59
RedundantFieldInitializer Avoid using redundant field initializer for 'trustEngine' 60
CommentRequired Protected method constructor comments are required 62–92
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 81
CommentRequired Public method and constructor comments are required 109–115
NonThreadSafeSingleton Singleton is not thread safe 111–114
CommentRequired Public method and constructor comments are required 117–120
CommentRequired Public method and constructor comments are required 122–151
CommentRequired Public method and constructor comments are required 153–158

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLResponseManager.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–543
CommentRequired Header comments are required 76–543
GodClass Possible God Class (WMC=66, ATFD=30, TCC=12.821%) 76–543
RedundantFieldInitializer Avoid using redundant field initializer for 'response' 78
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 133
CyclomaticComplexity The method 'validateResponseContent()' has a cyclomatic complexity of 33. 142–296
ExcessiveMethodLength Avoid really long methods. 142–296
NPathComplexity The method 'validateResponseContent()' has an NPath complexity of 73728 142–296
NcssCount The method 'validateResponseContent()' has a NCSS line count of 74. 142–296
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 157
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 188
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 199
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 220
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 267
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 278
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 289
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 311
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 332
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 381
IdenticalCatchBranches 'catch' branch identical to 'CertificateException' branch 383–389
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 388
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 418
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 455
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 455

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLTokenExtractor.java

Rule Violation Ligne
CommentRequired Header comments are required 60–125
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 61–125
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 71
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 87
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 114
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 120

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLTokenHandler.java

Rule Violation Ligne
CommentRequired Header comments are required 53–128
RedundantFieldInitializer Avoid using redundant field initializer for 'responseManager' 55
CommentRequired Public method and constructor comments are required 57–60
CommentRequired Public method and constructor comments are required 62–87

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/CertificateValidationException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–70
CommentRequired Public method and constructor comments are required 43–48
CommentRequired Public method and constructor comments are required 50–55
CommentRequired Public method and constructor comments are required 57–62
CommentRequired Public method and constructor comments are required 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/InvalidAttributeException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–70
CommentRequired Public method and constructor comments are required 43–48
CommentRequired Public method and constructor comments are required 50–55
CommentRequired Public method and constructor comments are required 57–62
CommentRequired Public method and constructor comments are required 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLCheckerException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–70
CommentRequired Public method and constructor comments are required 43–48
CommentRequired Public method and constructor comments are required 50–55
CommentRequired Public method and constructor comments are required 57–62
CommentRequired Public method and constructor comments are required 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLParsingException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–67
CommentRequired Public method and constructor comments are required 40–45
CommentRequired Public method and constructor comments are required 47–52
CommentRequired Public method and constructor comments are required 54–59
CommentRequired Public method and constructor comments are required 61–66

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLReponseCheckerException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–70
CommentRequired Public method and constructor comments are required 43–48
CommentRequired Public method and constructor comments are required 50–55
CommentRequired Public method and constructor comments are required 57–62
CommentRequired Public method and constructor comments are required 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLTokenExtractorException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–67
CommentRequired Public method and constructor comments are required 40–45
CommentRequired Public method and constructor comments are required 47–52
CommentRequired Public method and constructor comments are required 54–59
CommentRequired Public method and constructor comments are required 61–66

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SignatureValidationException.java

Rule Violation Ligne
CommentRequired Header comments are required 36–70
CommentRequired Public method and constructor comments are required 43–48
CommentRequired Public method and constructor comments are required 50–55
CommentRequired Public method and constructor comments are required 57–62
CommentRequired Public method and constructor comments are required 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/IDPMetadataManager.java

Rule Violation Ligne
CommentRequired Header comments are required 61–171
CallSuperInConstructor It is a good practice to call super() in a constructor 63–66
CommentRequired Public method and constructor comments are required 63–66
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 102
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 113
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 123
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 141
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 159
IdenticalCatchBranches 'catch' branch identical to 'CertificateException' branch 161–167
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 166

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/MetadataManager.java

Rule Violation Ligne
CommentRequired Header comments are required 60–136
RedundantFieldInitializer Avoid using redundant field initializer for 'metaData' 63
CommentRequired Public method and constructor comments are required 65–67
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 65–67
UncommentedEmptyConstructor Document empty constructor 65–67
CommentRequired Protected method constructor comments are required 69–126
CommentRequired Public method and constructor comments are required 128
CommentRequired Protected method constructor comments are required 130

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/SPMetadataManager.java

Rule Violation Ligne
CommentRequired Header comments are required 54–133
MissingOverride The method 'validateContent()' is missing an @Override annotation. 75–106
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 90
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 100
CommentRequired Public method and constructor comments are required 129–132

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/util/X509CertificateHelper.java

Rule Violation Ligne
CommentRequired Header comments are required 48–66
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 49–66
CommentRequired Public method and constructor comments are required 50–65
ShortVariable Avoid variables with short names like rc 53
ShortVariable Avoid variables with short names like in 54
ShortVariable Avoid variables with short names like cf 59

fr/paris/lutece/plugins/mylutece/modules/saml/service/SAMLService.java

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

Fichiers

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/SAMLAuthentication.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 62–225
MissingOverride The method 'getAnonymousUser()' is missing an @Override annotation. 3 69–72
MissingOverride The method 'getAuthServiceName()' is missing an @Override annotation. 3 78–81
MissingOverride The method 'getAuthType(HttpServletRequest)' is missing an @Override annotation. 3 88–91
MissingOverride The method 'isUserInRole(LuteceUser, HttpServletRequest, String)' is missing an @Override annotation. 3 100–103
MissingOverride The method 'login(String, String, HttpServletRequest)' is missing an @Override annotation. 3 117–163
CyclomaticComplexity The method 'login(String, String, HttpServletRequest)' has a cyclomatic complexity of 13. 3 117–163
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 134
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 3 136–140
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 139
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 3 141–145
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 144
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 3 146–150
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 149
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 3 151–155
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 154
IdenticalCatchBranches 'catch' branch identical to 'SignatureValidationException' branch 3 156–160
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 159
MissingOverride The method 'logout(LuteceUser)' is missing an @Override annotation. 3 169–171
UncommentedEmptyMethodBody Document empty method body 3 170–171
ShortVariable Avoid variables with short names like it 3 181
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 194
MissingOverride The method 'getRolesByUser(LuteceUser)' is missing an @Override annotation. 3 203–206
CommentRequired Public method and constructor comments are required 3 203–206
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1 203–206
MissingOverride The method 'getName()' is missing an @Override annotation. 3 212–215
MissingOverride The method 'getPluginName()' is missing an @Override annotation. 3 221–224

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/SAMLUser.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 40–51
CommentRequired Header comments are required 3 40–51

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/CertificateChecker.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 49–88
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 3 51–87
CommentRequired Public method and constructor comments are required 3 51–87
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 78
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 85

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/RequiredAttributesChecker.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 49–95
CommentRequired Public method and constructor comments are required 3 51–94
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 3 51–94

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLAssertionChecker.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 48–155
CommentRequired Public method and constructor comments are required 3 50–67
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 3 50–67
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 124
IntegerInstantiation Avoid instantiating Integer objects. Call Integer.valueOf() instead. 2 126–127

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLChecker.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 41–45
UnnecessaryModifier Unnecessary modifier 'public' on method 'check': the method is declared in an interface type 3 43–44
CommentRequired Public method and constructor comments are required 3 43–44

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SAMLResponseChecker.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 46–104
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 3 48–60
CommentRequired Public method and constructor comments are required 3 48–60

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/checkers/SignatureChecker.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 55–109
CommentRequired Public method and constructor comments are required 3 57–108
MissingOverride The method 'check(SAMLResponseManager)' is missing an @Override annotation. 3 57–108
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 71
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 100
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 102
IdenticalCatchBranches 'catch' branch identical to 'SecurityException' branch 3 102–107
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 106

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/config/ConfigProperties.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 47–176
RedundantFieldInitializer Avoid using redundant field initializer for 'instance' 3 50
FieldNamingConventions The static field name 'instance' doesn't match '_[a-z][a-zA-Z0-9]*' 1 50
AvoidFieldNameMatchingMethodName Field isTest has the same name as a method 3 51
FieldNamingConventions The field name 'isTest' doesn't match '_[a-z][a-zA-Z0-9]*' 1 51
RedundantFieldInitializer Avoid using redundant field initializer for 'isTest' 3 51
CallSuperInConstructor It is a good practice to call super() in a constructor 3 53–71
CommentRequired Protected method constructor comments are required 3 53–71
CommentRequired Public method and constructor comments are required 3 73–76
CommentRequired Public method and constructor comments are required 3 78–81
SignatureDeclareThrowsException A method/constructor should not explicitly throw java.lang.Exception 3 83
CommentRequired Public method and constructor comments are required 3 83–89
NonThreadSafeSingleton Singleton is not thread safe 3 85–88
CommentRequired Public method and constructor comments are required 3 91–99
NonThreadSafeSingleton Singleton is not thread safe 3 93–96
AssignmentInOperand Avoid assignments in operands 3 154

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/config/Constants.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–45
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'IDP_METADATA_FILE_PROP': the field is declared in an interface type 3 38
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 38
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'SP_METADATA_FILE_PROP': the field is declared in an interface type 3 39
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 39
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 40
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'SAML_RESPONSE_REQUEST_PARAM': the field is declared in an interface type 3 40
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_USER_NAME_ATTRIBUTE_NAME_PROP': the field is declared in an interface type 3 41
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 41
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_USER_GROUPS_ATTRIBUTE_NAME_PROP': the field is declared in an interface type 3 42
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 42
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_USER_ROLE_PROP': the field is declared in an interface type 3 43
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 43
ConstantsInInterface Avoid constants in interfaces. Interfaces define types, constants are implementation details better placed in classes or enums. See Effective Java, item 19. 3 44
UnnecessaryModifier Unnecessary modifiers 'public static' on field 'LUTECE_CLOCK_SKEW_PROP': the field is declared in an interface type 3 44

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/BootStrap.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 55–159
RedundantFieldInitializer Avoid using redundant field initializer for 'instance' 3 57
FieldNamingConventions The static field name 'instance' doesn't match '_[a-z][a-zA-Z0-9]*' 1 57
FieldNamingConventions The field name 'idpMetaDataManager' doesn't match '_[a-z][a-zA-Z0-9]*' 1 58
RedundantFieldInitializer Avoid using redundant field initializer for 'idpMetaDataManager' 3 58
RedundantFieldInitializer Avoid using redundant field initializer for 'spMetaDataManager' 3 59
FieldNamingConventions The field name 'spMetaDataManager' doesn't match '_[a-z][a-zA-Z0-9]*' 1 59
RedundantFieldInitializer Avoid using redundant field initializer for 'trustEngine' 3 60
FieldNamingConventions The field name 'trustEngine' doesn't match '_[a-z][a-zA-Z0-9]*' 1 60
CommentRequired Protected method constructor comments are required 3 62–92
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 81
CommentRequired Public method and constructor comments are required 3 109–115
NonThreadSafeSingleton Singleton is not thread safe 3 111–114
CommentRequired Public method and constructor comments are required 3 117–120
CommentRequired Public method and constructor comments are required 3 122–151
CommentRequired Public method and constructor comments are required 3 153–158

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLResponseManager.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–543
CommentRequired Header comments are required 3 76–543
GodClass Possible God Class (WMC=66, ATFD=30, TCC=12.821%) 3 76–543
RedundantFieldInitializer Avoid using redundant field initializer for 'response' 3 78
FieldNamingConventions The field name 'response' doesn't match '_[a-z][a-zA-Z0-9]*' 1 78
ConstructorCallsOverridableMethod Overridable method 'initialize' called during object construction 1 87
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 133
CyclomaticComplexity The method 'validateResponseContent()' has a cyclomatic complexity of 33. 3 142–296
ExcessiveMethodLength Avoid really long methods. 3 142–296
NPathComplexity The method 'validateResponseContent()' has an NPath complexity of 73728 3 142–296
NcssCount The method 'validateResponseContent()' has a NCSS line count of 74. 3 142–296
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 157
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 188
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 199
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 220
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 267
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 278
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 289
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 311
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 332
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 381
IdenticalCatchBranches 'catch' branch identical to 'CertificateException' branch 3 383–389
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 388
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 418
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 455
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 455

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLTokenExtractor.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 60–125
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 61–125
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 71
LocalVariableNamingConventions The local variable name 'SAMLResponseB64Str' doesn't match '[a-z][a-zA-Z0-9]*' 1 74
LocalVariableNamingConventions The local variable name 'SAMLResponseStr' doesn't match '[a-z][a-zA-Z0-9]*' 1 77
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 87
LocalVariableNamingConventions The local variable name 'ResponseRoot' doesn't match '[a-z][a-zA-Z0-9]*' 1 100
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 114
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 120

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/engine/SAMLTokenHandler.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 53–128
RedundantFieldInitializer Avoid using redundant field initializer for 'responseManager' 3 55
FieldNamingConventions The field name 'responseManager' doesn't match '_[a-z][a-zA-Z0-9]*' 1 55
CommentRequired Public method and constructor comments are required 3 57–60
CommentRequired Public method and constructor comments are required 3 62–87

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/CertificateValidationException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–70
CommentRequired Public method and constructor comments are required 3 43–48
CommentRequired Public method and constructor comments are required 3 50–55
CommentRequired Public method and constructor comments are required 3 57–62
CommentRequired Public method and constructor comments are required 3 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/InvalidAttributeException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–70
CommentRequired Public method and constructor comments are required 3 43–48
CommentRequired Public method and constructor comments are required 3 50–55
CommentRequired Public method and constructor comments are required 3 57–62
CommentRequired Public method and constructor comments are required 3 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLCheckerException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–70
CommentRequired Public method and constructor comments are required 3 43–48
CommentRequired Public method and constructor comments are required 3 50–55
CommentRequired Public method and constructor comments are required 3 57–62
CommentRequired Public method and constructor comments are required 3 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLParsingException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–67
CommentRequired Public method and constructor comments are required 3 40–45
CommentRequired Public method and constructor comments are required 3 47–52
CommentRequired Public method and constructor comments are required 3 54–59
CommentRequired Public method and constructor comments are required 3 61–66

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLReponseCheckerException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–70
CommentRequired Public method and constructor comments are required 3 43–48
CommentRequired Public method and constructor comments are required 3 50–55
CommentRequired Public method and constructor comments are required 3 57–62
CommentRequired Public method and constructor comments are required 3 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SAMLTokenExtractorException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–67
CommentRequired Public method and constructor comments are required 3 40–45
CommentRequired Public method and constructor comments are required 3 47–52
CommentRequired Public method and constructor comments are required 3 54–59
CommentRequired Public method and constructor comments are required 3 61–66

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/exceptions/SignatureValidationException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36–70
CommentRequired Public method and constructor comments are required 3 43–48
CommentRequired Public method and constructor comments are required 3 50–55
CommentRequired Public method and constructor comments are required 3 57–62
CommentRequired Public method and constructor comments are required 3 64–69

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/IDPMetadataManager.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 61–171
CallSuperInConstructor It is a good practice to call super() in a constructor 3 63–66
CommentRequired Public method and constructor comments are required 3 63–66
AvoidReassigningParameters Avoid reassigning parameters such as 'inFilePath' 2 74
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 102
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 113
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 123
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 141
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 159
IdenticalCatchBranches 'catch' branch identical to 'CertificateException' branch 3 161–167
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 166

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/MetadataManager.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 60–136
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 2 62
RedundantFieldInitializer Avoid using redundant field initializer for 'metaData' 3 63
FieldNamingConventions The field name 'metaData' doesn't match '_[a-z][a-zA-Z0-9]*' 1 63
CommentRequired Public method and constructor comments are required 3 65–67
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 65–67
UncommentedEmptyConstructor Document empty constructor 3 65–67
CommentRequired Protected method constructor comments are required 3 69–126
CommentRequired Public method and constructor comments are required 3 128
CommentRequired Protected method constructor comments are required 3 130

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/metadata/SPMetadataManager.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 54–133
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 2 56
AvoidReassigningParameters Avoid reassigning parameters such as 'inFilePath' 2 59
MissingOverride The method 'validateContent()' is missing an @Override annotation. 3 75–106
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 90
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 100
CommentRequired Public method and constructor comments are required 3 129–132

fr/paris/lutece/plugins/mylutece/modules/saml/authentication/util/X509CertificateHelper.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 48–66
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 49–66
CommentRequired Public method and constructor comments are required 3 50–65
ShortVariable Avoid variables with short names like rc 3 53
ShortVariable Avoid variables with short names like in 3 54
ShortVariable Avoid variables with short names like cf 3 59

fr/paris/lutece/plugins/mylutece/modules/saml/service/SAMLService.java

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