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/extend/modules/rating/business/RatingHome.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 10–144

fr/paris/lutece/plugins/extend/modules/rating/dashboard/PublicDashboardRating.java

Rule Violation Ligne
FieldNamingConventions The field name 'strIdComponent' doesn't match '_[a-z][a-zA-Z0-9]*' 56
FormalParameterNamingConventions The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' 77
FormalParameterNamingConventions The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' 90
LocalVariableNamingConventions The local variable name '_resourceExtenderHistoryService' doesn't match '[a-z][a-zA-Z0-9]*' 93

fr/paris/lutece/plugins/extend/modules/rating/service/RatingListenerService.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 47–161

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingFacadeFactory.java

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

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeImpl.java

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

fr/paris/lutece/plugins/extend/modules/rating/util/constants/RatingConstants.java

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

fr/paris/lutece/plugins/extend/modules/rating/util/constants/RatingUtils.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 15–113

Priority 2

fr/paris/lutece/plugins/extend/modules/rating/util/constants/RatingUtils.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strParameters' 65
GuardLogStatement Logger calls should be surrounded by log level guards. 88

Priority 3

fr/paris/lutece/plugins/extend/modules/rating/business/IRatingDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 46–137
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 98
CommentRequired Public method and constructor comments are required 133
CommentRequired Public method and constructor comments are required 135

fr/paris/lutece/plugins/extend/modules/rating/business/Rating.java

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

fr/paris/lutece/plugins/extend/modules/rating/business/RatingDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 53–467
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 173
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 243
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 265
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 299
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 318
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 329
MissingOverride The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' is missing an @Override annotation. 351–416
CyclomaticComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has a cyclomatic complexity of 12. 351–416
NPathComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has an NPath complexity of 2080 351–416
CommentRequired Public method and constructor comments are required 351–416
AssignmentInOperand Avoid assignments in operands 450
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 450

fr/paris/lutece/plugins/extend/modules/rating/business/RatingExtenderFilter.java

Rule Violation Ligne
CommentRequired Header comments are required 5–148
UseUnderscoresInNumericLiterals Number 99999.9999999f should separate every third digit with an underscore 8

fr/paris/lutece/plugins/extend/modules/rating/business/RatingHome.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 10–144
CommentRequired Header comments are required 10–144
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 87

fr/paris/lutece/plugins/extend/modules/rating/business/SimpleRating.java

Rule Violation Ligne
CommentRequired Header comments are required 5–15

fr/paris/lutece/plugins/extend/modules/rating/business/StarRating.java

Rule Violation Ligne
CommentRequired Header comments are required 5–54

fr/paris/lutece/plugins/extend/modules/rating/business/ThumbRating.java

Rule Violation Ligne
CommentRequired Header comments are required 7–64

fr/paris/lutece/plugins/extend/modules/rating/business/config/RatingExtenderConfig.java

Rule Violation Ligne
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 243
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 256

fr/paris/lutece/plugins/extend/modules/rating/business/config/RatingtExtenderConfigDAO.java

Rule Violation Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 57–71

fr/paris/lutece/plugins/extend/modules/rating/dashboard/PublicDashboardRating.java

Rule Violation Ligne
ImmutableField Private field 'strIdComponent' could be made final; it is only initialized in the declaration or constructor. 56
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 79
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 79
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 98

fr/paris/lutece/plugins/extend/modules/rating/service/IRatingListener.java

Rule Violation Ligne
UnnecessaryModifier Unnecessary modifier 'public' on method 'rating': the method is declared in an interface type 50
UnnecessaryModifier Unnecessary modifier 'public' on method 'cancelRating': the method is declared in an interface type 58

fr/paris/lutece/plugins/extend/modules/rating/service/RatingListenerService.java

Rule Violation Ligne
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 54
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 73–83
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 154

fr/paris/lutece/plugins/extend/modules/rating/service/RatingService.java

Rule Violation Ligne
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 88
ShortVariable Avoid variables with short names like i 122
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 167

fr/paris/lutece/plugins/extend/modules/rating/service/facade/DefaultRatingTypeImpl.java

Rule Violation Ligne
CommentRequired Header comments are required 34–197
AvoidProtectedFieldInFinalClass Avoid protected fields in a final class. Change to private or package access. 42
AvoidProtectedFieldInFinalClass Avoid protected fields in a final class. Change to private or package access. 46
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 103
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 105
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 107
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 113
ConfusingTernary Avoid if (x != y) ..; else ..; 122–144
ControlStatementBraces This statement should have braces 175

fr/paris/lutece/plugins/extend/modules/rating/service/facade/QuinquaFunction.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like t 35
ShortVariable Avoid variables with short names like v 35
ShortVariable Avoid variables with short names like x 35
ShortVariable Avoid variables with short names like u 35
ShortVariable Avoid variables with short names like w 35

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingFacadeFactory.java

Rule Violation Ligne
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. 23–286
CommentRequired Header comments are required 23–286
CommentRequired Protected method constructor comments are required 29–31
UncommentedEmptyConstructor Document empty constructor 29–31
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 195
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 219
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 239
NonThreadSafeSingleton Singleton is not thread safe 251–253

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingType.java

Rule Violation Ligne
UnnecessaryModifier Unnecessary modifier 'public' on method 'newRatingType': the method is declared in an interface type 31–33
UnnecessaryModifier Unnecessary modifier 'public' on method 'newBuilder': the method is declared in an interface type 40–42
UnnecessaryModifier Unnecessary modifier 'public' on interface 'Builder': members of interface types are implicitly public 47–96
UnnecessaryModifier Unnecessary modifier 'public' on method 'doRating': the method is declared in an interface type 54
UnnecessaryModifier Unnecessary modifier 'public' on method 'cancelRating': the method is declared in an interface type 60
UnnecessaryModifier Unnecessary modifier 'public' on method 'getPageAddOn': the method is declared in an interface type 66
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForExport': the method is declared in an interface type 72
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForRecap': the method is declared in an interface type 78
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtender': the method is declared in an interface type 84
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtenderByList': the method is declared in an interface type 90
UnnecessaryModifier Unnecessary modifier 'public' on method 'build': the method is declared in an interface type 95
UnnecessaryModifier Unnecessary modifier 'public' on method 'doRating': the method is declared in an interface type 101
UnnecessaryModifier Unnecessary modifier 'public' on method 'cancelRating': the method is declared in an interface type 106
UnnecessaryModifier Unnecessary modifier 'public' on method 'getPageAddOn': the method is declared in an interface type 111–112
UnnecessaryModifier Unnecessary modifier 'public' on method 'getType': the method is declared in an interface type 117
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTypeName': the method is declared in an interface type 122
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTitle': the method is declared in an interface type 127
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForExport': the method is declared in an interface type 132
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForRecap': the method is declared in an interface type 137
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtender': the method is declared in an interface type 142
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtenderByList': the method is declared in an interface type 147

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeBuilderImpl.java

Rule Violation Ligne
CommentRequired Header comments are required 14–106
DefaultPackage Use explicit scoping instead of the default package private level 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _strTitle field if you want a default access modifier 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _type field if you want a default access modifier 18
DefaultPackage Use explicit scoping instead of the default package private level 18
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _doRating field if you want a default access modifier 20
DefaultPackage Use explicit scoping instead of the default package private level 20
DefaultPackage Use explicit scoping instead of the default package private level 21
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _cancelRating field if you want a default access modifier 21
DefaultPackage Use explicit scoping instead of the default package private level 22
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getPageAddOn field if you want a default access modifier 22
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForExport field if you want a default access modifier 26
DefaultPackage Use explicit scoping instead of the default package private level 26
DefaultPackage Use explicit scoping instead of the default package private level 30
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForRecap field if you want a default access modifier 30
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoExtender field if you want a default access modifier 35
DefaultPackage Use explicit scoping instead of the default package private level 35
DefaultPackage Use explicit scoping instead of the default package private level 41
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoExtenderByList field if you want a default access modifier 41
CommentRequired Protected method constructor comments are required 44–50
MissingOverride The method 'doRating(Consumer)' is missing an @Override annotation. 51–56
CommentRequired Public method and constructor comments are required 51–56
MissingOverride The method 'cancelRating(Consumer)' is missing an @Override annotation. 57–62
CommentRequired Public method and constructor comments are required 57–62
MissingOverride The method 'getPageAddOn(QuinquaFunction)' is missing an @Override annotation. 63–68
CommentRequired Public method and constructor comments are required 63–68
MissingOverride The method 'getInfoForExport(BinaryOperator)' is missing an @Override annotation. 70–75
CommentRequired Public method and constructor comments are required 70–75
CommentRequired Public method and constructor comments are required 76–81
MissingOverride The method 'getInfoForRecap(BinaryOperator)' is missing an @Override annotation. 76–81
CommentRequired Public method and constructor comments are required 82–87
MissingOverride The method 'getInfoExtender(BiFunction)' is missing an @Override annotation. 82–87
MissingOverride The method 'getInfoExtenderByList(BiFunction)' is missing an @Override annotation. 88–93
CommentRequired Public method and constructor comments are required 88–93
MissingOverride The method 'build()' is missing an @Override annotation. 100–103

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeException.java

Rule Violation Ligne
CommentRequired Header comments are required 3–10

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeImpl.java

Rule Violation Ligne
CommentRequired Header comments are required 14–222
CommentRequired Header comments are required 131–138
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. 131–138
DefaultPackage Use explicit scoping instead of the default package private level 133–137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the createRatingType method if you want a default access modifier 133–137
DefaultPackage Use explicit scoping instead of the default package private level 144–149
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the create method if you want a default access modifier 144–149
MissingOverride The method 'doRating(Rating)' is missing an @Override annotation. 153–156
MissingOverride The method 'cancelRating(Rating)' is missing an @Override annotation. 160–163
MissingOverride The method 'getPageAddOn(RatingExtenderConfig, String, String, String, HttpServletRequest)' is missing an @Override annotation. 168–172
MissingOverride The method 'getType()' is missing an @Override annotation. 176–179
MissingOverride The method 'getTypeName()' is missing an @Override annotation. 183–186
MissingOverride The method 'getTitle()' is missing an @Override annotation. 190–193
MissingOverride The method 'getInfoForExport(String, String)' is missing an @Override annotation. 197–200
MissingOverride The method 'getInfoForRecap(String, String)' is missing an @Override annotation. 204–207
MissingOverride The method 'getInfoExtender(String, String)' is missing an @Override annotation. 211–214
MissingOverride The method 'getInfoExtenderByList(List, String)' is missing an @Override annotation. 218–221

fr/paris/lutece/plugins/extend/modules/rating/service/security/IRatingSecurityService.java

Rule Violation Ligne
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'BEAN_SERVICE': the field is declared in an interface type 49

fr/paris/lutece/plugins/extend/modules/rating/service/security/RatingSecurityService.java

Rule Violation Ligne
ImmutableField Private field '_userRatingLock' could be made final; it is only initialized in the declaration or constructor. 78
CyclomaticComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 14. 105–140
NPathComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has an NPath complexity of 384 105–140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 196–199
CyclomaticComplexity The method 'canIfRatingIsLimited(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 13. 265–315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 306–309

fr/paris/lutece/plugins/extend/modules/rating/service/validator/IRatingValidator.java

Rule Violation Ligne
CommentRequired Header comments are required 5–27

fr/paris/lutece/plugins/extend/modules/rating/service/validator/RatingValidationService.java

Rule Violation Ligne
CommentRequired Header comments are required 19–78
CyclomaticComplexity The method 'validateRating(HttpServletRequest, LuteceUser, String, String, float)' has a cyclomatic complexity of 10. 30–64
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 38
CollapsibleIfStatements These nested if statements could be combined 55–60

fr/paris/lutece/plugins/extend/modules/rating/util/constants/RatingUtils.java

Rule Violation Ligne
CommentRequired Header comments are required 15–113
CommentRequired Enum comments are required 24–49
CommentRequired Public method and constructor comments are required 39–42
CommentRequired Public method and constructor comments are required 44–47
CommentRequired Public method and constructor comments are required 96–112

fr/paris/lutece/plugins/extend/modules/rating/web/RatingJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–322
ImmutableField Private field '_configService' could be made final; it is only initialized in the declaration or constructor. 89
ImmutableField Private field '_resourceExtenderService' could be made final; it is only initialized in the declaration or constructor. 90
CyclomaticComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 15. 103–200
NPathComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 810 103–200
ConfusingTernary Avoid if (x != y) ..; else ..; 117
ConfusingTernary Avoid if (x != y) ..; else ..; 141–159
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 173
CyclomaticComplexity The method 'doCancelRating(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 11. 212–270
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 215–217
ConfusingTernary Avoid if (x != y) ..; else ..; 251–269
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 289

fr/paris/lutece/plugins/extend/modules/rating/web/action/RatingInstallerPluginAction.java

Rule Violation Ligne
UncommentedEmptyMethodBody Document empty method body 76–77

fr/paris/lutece/plugins/extend/modules/rating/web/component/RatingResourceExtenderComponent.java

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

Priority 4

fr/paris/lutece/plugins/extend/modules/rating/business/Rating.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.rating.util.constants.RatingUtils' 37
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 103

fr/paris/lutece/plugins/extend/modules/rating/web/component/RatingResourceExtenderComponent.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.rating.service.RatingService' 39

Fichiers

fr/paris/lutece/plugins/extend/modules/rating/business/IRatingDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 46–137
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 98
CommentRequired Public method and constructor comments are required 3 133
CommentRequired Public method and constructor comments are required 3 135

fr/paris/lutece/plugins/extend/modules/rating/business/Rating.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.rating.util.constants.RatingUtils' 4 37
UseVarargs Consider using varargs for methods or constructors which take an array the last parameter. 4 103
ConfusingTernary Avoid if (x != y) ..; else ..; 3 163
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 175

fr/paris/lutece/plugins/extend/modules/rating/business/RatingDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 53–467
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 173
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 243
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 265
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 299
OptimizableToArrayCall This call to Collection.toArray() may be optimizable 3 318
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 329
MissingOverride The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' is missing an @Override annotation. 3 351–416
CyclomaticComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has a cyclomatic complexity of 12. 3 351–416
NPathComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has an NPath complexity of 2080 3 351–416
CommentRequired Public method and constructor comments are required 3 351–416
AssignmentInOperand Avoid assignments in operands 3 450
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 450

fr/paris/lutece/plugins/extend/modules/rating/business/RatingExtenderFilter.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 5–148
UseUnderscoresInNumericLiterals Number 99999.9999999f should separate every third digit with an underscore 3 8

fr/paris/lutece/plugins/extend/modules/rating/business/RatingHome.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 10–144
CommentRequired Header comments are required 3 10–144
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 10–144
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 87

fr/paris/lutece/plugins/extend/modules/rating/business/SimpleRating.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 5–15

fr/paris/lutece/plugins/extend/modules/rating/business/StarRating.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 5–54

fr/paris/lutece/plugins/extend/modules/rating/business/ThumbRating.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 7–64

fr/paris/lutece/plugins/extend/modules/rating/business/config/RatingExtenderConfig.java

Rule Violation Priority Ligne
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 243
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 256

fr/paris/lutece/plugins/extend/modules/rating/business/config/RatingtExtenderConfigDAO.java

Rule Violation Priority Ligne
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 57–71

fr/paris/lutece/plugins/extend/modules/rating/dashboard/PublicDashboardRating.java

Rule Violation Priority Ligne
ImmutableField Private field 'strIdComponent' could be made final; it is only initialized in the declaration or constructor. 3 56
FieldNamingConventions The field name 'strIdComponent' doesn't match '_[a-z][a-zA-Z0-9]*' 1 56
FormalParameterNamingConventions The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 77
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 79
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 79
FormalParameterNamingConventions The method parameter name 'user_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 90
LocalVariableNamingConventions The local variable name '_resourceExtenderHistoryService' doesn't match '[a-z][a-zA-Z0-9]*' 1 93
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 98

fr/paris/lutece/plugins/extend/modules/rating/service/IRatingListener.java

Rule Violation Priority Ligne
UnnecessaryModifier Unnecessary modifier 'public' on method 'rating': the method is declared in an interface type 3 50
UnnecessaryModifier Unnecessary modifier 'public' on method 'cancelRating': the method is declared in an interface type 3 58

fr/paris/lutece/plugins/extend/modules/rating/service/RatingListenerService.java

Rule Violation Priority Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47–161
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 54
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 73–83
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 154

fr/paris/lutece/plugins/extend/modules/rating/service/RatingService.java

Rule Violation Priority Ligne
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 88
ShortVariable Avoid variables with short names like i 3 122
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 167

fr/paris/lutece/plugins/extend/modules/rating/service/facade/DefaultRatingTypeImpl.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 34–197
AvoidProtectedFieldInFinalClass Avoid protected fields in a final class. Change to private or package access. 3 42
AvoidProtectedFieldInFinalClass Avoid protected fields in a final class. Change to private or package access. 3 46
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 103
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 105
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 3 107
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 113
ConfusingTernary Avoid if (x != y) ..; else ..; 3 122–144
ControlStatementBraces This statement should have braces 3 175

fr/paris/lutece/plugins/extend/modules/rating/service/facade/QuinquaFunction.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like t 3 35
ShortVariable Avoid variables with short names like v 3 35
ShortVariable Avoid variables with short names like x 3 35
ShortVariable Avoid variables with short names like u 3 35
ShortVariable Avoid variables with short names like w 3 35

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingFacadeFactory.java

Rule Violation Priority Ligne
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 23–286
ClassNamingConventions The utility class name 'RatingFacadeFactory' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 23–286
CommentRequired Header comments are required 3 23–286
CommentRequired Protected method constructor comments are required 3 29–31
UncommentedEmptyConstructor Document empty constructor 3 29–31
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 195
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 219
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 239
NonThreadSafeSingleton Singleton is not thread safe 3 251–253

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingType.java

Rule Violation Priority Ligne
UnnecessaryModifier Unnecessary modifier 'public' on method 'newRatingType': the method is declared in an interface type 3 31–33
UnnecessaryModifier Unnecessary modifier 'public' on method 'newBuilder': the method is declared in an interface type 3 40–42
UnnecessaryModifier Unnecessary modifier 'public' on interface 'Builder': members of interface types are implicitly public 3 47–96
UnnecessaryModifier Unnecessary modifier 'public' on method 'doRating': the method is declared in an interface type 3 54
UnnecessaryModifier Unnecessary modifier 'public' on method 'cancelRating': the method is declared in an interface type 3 60
UnnecessaryModifier Unnecessary modifier 'public' on method 'getPageAddOn': the method is declared in an interface type 3 66
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForExport': the method is declared in an interface type 3 72
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForRecap': the method is declared in an interface type 3 78
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtender': the method is declared in an interface type 3 84
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtenderByList': the method is declared in an interface type 3 90
UnnecessaryModifier Unnecessary modifier 'public' on method 'build': the method is declared in an interface type 3 95
UnnecessaryModifier Unnecessary modifier 'public' on method 'doRating': the method is declared in an interface type 3 101
UnnecessaryModifier Unnecessary modifier 'public' on method 'cancelRating': the method is declared in an interface type 3 106
UnnecessaryModifier Unnecessary modifier 'public' on method 'getPageAddOn': the method is declared in an interface type 3 111–112
UnnecessaryModifier Unnecessary modifier 'public' on method 'getType': the method is declared in an interface type 3 117
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTypeName': the method is declared in an interface type 3 122
UnnecessaryModifier Unnecessary modifier 'public' on method 'getTitle': the method is declared in an interface type 3 127
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForExport': the method is declared in an interface type 3 132
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoForRecap': the method is declared in an interface type 3 137
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtender': the method is declared in an interface type 3 142
UnnecessaryModifier Unnecessary modifier 'public' on method 'getInfoExtenderByList': the method is declared in an interface type 3 147

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeBuilderImpl.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 14–106
DefaultPackage Use explicit scoping instead of the default package private level 3 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _strTitle field if you want a default access modifier 3 17
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _type field if you want a default access modifier 3 18
DefaultPackage Use explicit scoping instead of the default package private level 3 18
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _doRating field if you want a default access modifier 3 20
DefaultPackage Use explicit scoping instead of the default package private level 3 20
DefaultPackage Use explicit scoping instead of the default package private level 3 21
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _cancelRating field if you want a default access modifier 3 21
DefaultPackage Use explicit scoping instead of the default package private level 3 22
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getPageAddOn field if you want a default access modifier 3 22
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForExport field if you want a default access modifier 3 26
DefaultPackage Use explicit scoping instead of the default package private level 3 26
DefaultPackage Use explicit scoping instead of the default package private level 3 30
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForRecap field if you want a default access modifier 3 30
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoExtender field if you want a default access modifier 3 35
DefaultPackage Use explicit scoping instead of the default package private level 3 35
DefaultPackage Use explicit scoping instead of the default package private level 3 41
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoExtenderByList field if you want a default access modifier 3 41
CommentRequired Protected method constructor comments are required 3 44–50
MissingOverride The method 'doRating(Consumer)' is missing an @Override annotation. 3 51–56
CommentRequired Public method and constructor comments are required 3 51–56
MissingOverride The method 'cancelRating(Consumer)' is missing an @Override annotation. 3 57–62
CommentRequired Public method and constructor comments are required 3 57–62
MissingOverride The method 'getPageAddOn(QuinquaFunction)' is missing an @Override annotation. 3 63–68
CommentRequired Public method and constructor comments are required 3 63–68
MissingOverride The method 'getInfoForExport(BinaryOperator)' is missing an @Override annotation. 3 70–75
CommentRequired Public method and constructor comments are required 3 70–75
CommentRequired Public method and constructor comments are required 3 76–81
MissingOverride The method 'getInfoForRecap(BinaryOperator)' is missing an @Override annotation. 3 76–81
CommentRequired Public method and constructor comments are required 3 82–87
MissingOverride The method 'getInfoExtender(BiFunction)' is missing an @Override annotation. 3 82–87
MissingOverride The method 'getInfoExtenderByList(BiFunction)' is missing an @Override annotation. 3 88–93
CommentRequired Public method and constructor comments are required 3 88–93
MissingOverride The method 'build()' is missing an @Override annotation. 3 100–103

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeException.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3–10

fr/paris/lutece/plugins/extend/modules/rating/service/facade/RatingTypeImpl.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 14–222
CommentRequired Header comments are required 3 131–138
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 131–138
ClassNamingConventions The utility class name 'RatingTypeFacadeFactory' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 131–138
DefaultPackage Use explicit scoping instead of the default package private level 3 133–137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the createRatingType method if you want a default access modifier 3 133–137
DefaultPackage Use explicit scoping instead of the default package private level 3 144–149
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the create method if you want a default access modifier 3 144–149
MissingOverride The method 'doRating(Rating)' is missing an @Override annotation. 3 153–156
MissingOverride The method 'cancelRating(Rating)' is missing an @Override annotation. 3 160–163
MissingOverride The method 'getPageAddOn(RatingExtenderConfig, String, String, String, HttpServletRequest)' is missing an @Override annotation. 3 168–172
MissingOverride The method 'getType()' is missing an @Override annotation. 3 176–179
MissingOverride The method 'getTypeName()' is missing an @Override annotation. 3 183–186
MissingOverride The method 'getTitle()' is missing an @Override annotation. 3 190–193
MissingOverride The method 'getInfoForExport(String, String)' is missing an @Override annotation. 3 197–200
MissingOverride The method 'getInfoForRecap(String, String)' is missing an @Override annotation. 3 204–207
MissingOverride The method 'getInfoExtender(String, String)' is missing an @Override annotation. 3 211–214
MissingOverride The method 'getInfoExtenderByList(List, String)' is missing an @Override annotation. 3 218–221

fr/paris/lutece/plugins/extend/modules/rating/service/security/IRatingSecurityService.java

Rule Violation Priority Ligne
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'BEAN_SERVICE': the field is declared in an interface type 3 49

fr/paris/lutece/plugins/extend/modules/rating/service/security/RatingSecurityService.java

Rule Violation Priority Ligne
ImmutableField Private field '_userRatingLock' could be made final; it is only initialized in the declaration or constructor. 3 78
CyclomaticComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 14. 3 105–140
NPathComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has an NPath complexity of 384 3 105–140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 196–199
CyclomaticComplexity The method 'canIfRatingIsLimited(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 13. 3 265–315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 306–309

fr/paris/lutece/plugins/extend/modules/rating/service/validator/IRatingValidator.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 5–27

fr/paris/lutece/plugins/extend/modules/rating/service/validator/RatingValidationService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 19–78
CyclomaticComplexity The method 'validateRating(HttpServletRequest, LuteceUser, String, String, float)' has a cyclomatic complexity of 10. 3 30–64
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 38
CollapsibleIfStatements These nested if statements could be combined 3 55–60

fr/paris/lutece/plugins/extend/modules/rating/util/constants/RatingConstants.java

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

fr/paris/lutece/plugins/extend/modules/rating/util/constants/RatingUtils.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 15–113
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 15–113
CommentRequired Enum comments are required 3 24–49
CommentRequired Public method and constructor comments are required 3 39–42
CommentRequired Public method and constructor comments are required 3 44–47
AvoidReassigningParameters Avoid reassigning parameters such as 'strParameters' 2 65
GuardLogStatement Logger calls should be surrounded by log level guards. 2 88
CommentRequired Public method and constructor comments are required 3 96–112

fr/paris/lutece/plugins/extend/modules/rating/web/RatingJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–322
ImmutableField Private field '_configService' could be made final; it is only initialized in the declaration or constructor. 3 89
ImmutableField Private field '_resourceExtenderService' could be made final; it is only initialized in the declaration or constructor. 3 90
CyclomaticComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 15. 3 103–200
NPathComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 810 3 103–200
ConfusingTernary Avoid if (x != y) ..; else ..; 3 117
ConfusingTernary Avoid if (x != y) ..; else ..; 3 141–159
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 173
CyclomaticComplexity The method 'doCancelRating(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 11. 3 212–270
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 215–217
ConfusingTernary Avoid if (x != y) ..; else ..; 3 251–269
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 289

fr/paris/lutece/plugins/extend/modules/rating/web/action/RatingInstallerPluginAction.java

Rule Violation Priority Ligne
UncommentedEmptyMethodBody Document empty method body 3 76–77

fr/paris/lutece/plugins/extend/modules/rating/web/component/RatingResourceExtenderComponent.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.rating.service.RatingService' 4 39
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 118
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 146