Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 1

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

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

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

Rule Violation Line
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 Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 47161

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

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

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

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

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

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

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

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

Priority 2

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

Rule Violation Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 46137
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 Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 53467
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
CommentRequired Public method and constructor comments are required 351416
NPathComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has an NPath complexity of 2080 351416
CyclomaticComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has a cyclomatic complexity of 12. 351416
MissingOverride The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' is missing an @Override annotation. 351416
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 Line
CommentRequired Header comments are required 5148
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 10144
CommentRequired Header comments are required 10144
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 Line
CommentRequired Header comments are required 515

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

Rule Violation Line
CommentRequired Header comments are required 554

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

Rule Violation Line
CommentRequired Header comments are required 764

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

Rule Violation Line
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 Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 5771

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

Rule Violation Line
ImmutableField Private field 'strIdComponent' could be made final; it is only initialized in the declaration or constructor. 56
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 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 Line
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 Line
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 7383
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 Line
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 Line
CommentRequired Header comments are required 34197
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 ..; 122144
ControlStatementBraces This statement should have braces 175

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

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

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

Rule Violation Line
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. 23286
CommentRequired Header comments are required 23286
CommentRequired Protected method constructor comments are required 2931
UncommentedEmptyConstructor Document empty constructor 2931
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 251253

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

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'newRatingType': the method is declared in an interface type 3133
UnnecessaryModifier Unnecessary modifier 'public' on method 'newBuilder': the method is declared in an interface type 4042
UnnecessaryModifier Unnecessary modifier 'public' on interface 'Builder': members of interface types are implicitly public 4796
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 111112
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 Line
CommentRequired Header comments are required 14106
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
DefaultPackage Use explicit scoping instead of the default package private level 20
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 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
DefaultPackage Use explicit scoping instead of the default package private level 26
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForExport field if you want a default access modifier 26
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForRecap field if you want a default access modifier 30
DefaultPackage Use explicit scoping instead of the default package private level 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 4450
MissingOverride The method 'doRating(Consumer)' is missing an @Override annotation. 5156
CommentRequired Public method and constructor comments are required 5156
MissingOverride The method 'cancelRating(Consumer)' is missing an @Override annotation. 5762
CommentRequired Public method and constructor comments are required 5762
CommentRequired Public method and constructor comments are required 6368
MissingOverride The method 'getPageAddOn(QuinquaFunction)' is missing an @Override annotation. 6368
MissingOverride The method 'getInfoForExport(BinaryOperator)' is missing an @Override annotation. 7075
CommentRequired Public method and constructor comments are required 7075
MissingOverride The method 'getInfoForRecap(BinaryOperator)' is missing an @Override annotation. 7681
CommentRequired Public method and constructor comments are required 7681
MissingOverride The method 'getInfoExtender(BiFunction)' is missing an @Override annotation. 8287
CommentRequired Public method and constructor comments are required 8287
CommentRequired Public method and constructor comments are required 8893
MissingOverride The method 'getInfoExtenderByList(BiFunction)' is missing an @Override annotation. 8893
MissingOverride The method 'build()' is missing an @Override annotation. 100103

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

Rule Violation Line
CommentRequired Header comments are required 310

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

Rule Violation Line
CommentRequired Header comments are required 14222
CommentRequired Header comments are required 131138
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. 131138
DefaultPackage Use explicit scoping instead of the default package private level 133137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the createRatingType method if you want a default access modifier 133137
DefaultPackage Use explicit scoping instead of the default package private level 144149
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the create method if you want a default access modifier 144149
MissingOverride The method 'doRating(Rating)' is missing an @Override annotation. 153156
MissingOverride The method 'cancelRating(Rating)' is missing an @Override annotation. 160163
MissingOverride The method 'getPageAddOn(RatingExtenderConfig, String, String, String, HttpServletRequest)' is missing an @Override annotation. 168172
MissingOverride The method 'getType()' is missing an @Override annotation. 176179
MissingOverride The method 'getTypeName()' is missing an @Override annotation. 183186
MissingOverride The method 'getTitle()' is missing an @Override annotation. 190193
MissingOverride The method 'getInfoForExport(String, String)' is missing an @Override annotation. 197200
MissingOverride The method 'getInfoForRecap(String, String)' is missing an @Override annotation. 204207
MissingOverride The method 'getInfoExtender(String, String)' is missing an @Override annotation. 211214
MissingOverride The method 'getInfoExtenderByList(List, String)' is missing an @Override annotation. 218221

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

Rule Violation Line
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 Line
ImmutableField Private field '_userRatingLock' could be made final; it is only initialized in the declaration or constructor. 78
NPathComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has an NPath complexity of 384 105140
CyclomaticComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 14. 105140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 196199
CyclomaticComplexity The method 'canIfRatingIsLimited(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 13. 265315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 306309

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

Rule Violation Line
CommentRequired Header comments are required 527

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

Rule Violation Line
CommentRequired Header comments are required 1978
CyclomaticComplexity The method 'validateRating(HttpServletRequest, LuteceUser, String, String, float)' has a cyclomatic complexity of 10. 3064
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 38
CollapsibleIfStatements These nested if statements could be combined 5560

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

Rule Violation Line
CommentRequired Header comments are required 15113
CommentRequired Enum comments are required 2449
CommentRequired Public method and constructor comments are required 3942
CommentRequired Public method and constructor comments are required 4447
CommentRequired Public method and constructor comments are required 96112

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34322
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
NPathComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 810 103200
CyclomaticComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 15. 103200
ConfusingTernary Avoid if (x != y) ..; else ..; 117
ConfusingTernary Avoid if (x != y) ..; else ..; 141159
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. 212270
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 215217
ConfusingTernary Avoid if (x != y) ..; else ..; 251269
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 Line
UncommentedEmptyMethodBody Document empty method body 7677

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

Rule Violation Line
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 Line
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 Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.extend.modules.rating.service.RatingService' 39

Files

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

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 46137
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 Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 3 53467
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
CommentRequired Public method and constructor comments are required 3 351416
NPathComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has an NPath complexity of 2080 3 351416
CyclomaticComplexity The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' has a cyclomatic complexity of 12. 3 351416
MissingOverride The method 'selectRatingByFilter(RatingExtenderFilter, Plugin)' is missing an @Override annotation. 3 351416
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 Line
CommentRequired Header comments are required 3 5148
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 3 10144
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 10144
CommentRequired Header comments are required 3 10144
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 Line
CommentRequired Header comments are required 3 515

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 554

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 764

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

Rule Violation Priority Line
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 Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 5771

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

Rule Violation Priority Line
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
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 79
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 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 Line
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 Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47161
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 7383
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 Line
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 Line
CommentRequired Header comments are required 3 34197
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 122144
ControlStatementBraces This statement should have braces 3 175

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

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

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

Rule Violation Priority Line
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 23286
CommentRequired Header comments are required 3 23286
ClassNamingConventions The utility class name 'RatingFacadeFactory' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 23286
CommentRequired Protected method constructor comments are required 3 2931
UncommentedEmptyConstructor Document empty constructor 3 2931
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 251253

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

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'newRatingType': the method is declared in an interface type 3 3133
UnnecessaryModifier Unnecessary modifier 'public' on method 'newBuilder': the method is declared in an interface type 3 4042
UnnecessaryModifier Unnecessary modifier 'public' on interface 'Builder': members of interface types are implicitly public 3 4796
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 111112
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 Line
CommentRequired Header comments are required 3 14106
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
DefaultPackage Use explicit scoping instead of the default package private level 3 20
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 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
DefaultPackage Use explicit scoping instead of the default package private level 3 26
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForExport field if you want a default access modifier 3 26
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _getInfoForRecap field if you want a default access modifier 3 30
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 _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 4450
MissingOverride The method 'doRating(Consumer)' is missing an @Override annotation. 3 5156
CommentRequired Public method and constructor comments are required 3 5156
MissingOverride The method 'cancelRating(Consumer)' is missing an @Override annotation. 3 5762
CommentRequired Public method and constructor comments are required 3 5762
CommentRequired Public method and constructor comments are required 3 6368
MissingOverride The method 'getPageAddOn(QuinquaFunction)' is missing an @Override annotation. 3 6368
MissingOverride The method 'getInfoForExport(BinaryOperator)' is missing an @Override annotation. 3 7075
CommentRequired Public method and constructor comments are required 3 7075
MissingOverride The method 'getInfoForRecap(BinaryOperator)' is missing an @Override annotation. 3 7681
CommentRequired Public method and constructor comments are required 3 7681
MissingOverride The method 'getInfoExtender(BiFunction)' is missing an @Override annotation. 3 8287
CommentRequired Public method and constructor comments are required 3 8287
CommentRequired Public method and constructor comments are required 3 8893
MissingOverride The method 'getInfoExtenderByList(BiFunction)' is missing an @Override annotation. 3 8893
MissingOverride The method 'build()' is missing an @Override annotation. 3 100103

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 310

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 14222
CommentRequired Header comments are required 3 131138
ClassNamingConventions The utility class name 'RatingTypeFacadeFactory' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 131138
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 131138
DefaultPackage Use explicit scoping instead of the default package private level 3 133137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the createRatingType method if you want a default access modifier 3 133137
DefaultPackage Use explicit scoping instead of the default package private level 3 144149
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the create method if you want a default access modifier 3 144149
MissingOverride The method 'doRating(Rating)' is missing an @Override annotation. 3 153156
MissingOverride The method 'cancelRating(Rating)' is missing an @Override annotation. 3 160163
MissingOverride The method 'getPageAddOn(RatingExtenderConfig, String, String, String, HttpServletRequest)' is missing an @Override annotation. 3 168172
MissingOverride The method 'getType()' is missing an @Override annotation. 3 176179
MissingOverride The method 'getTypeName()' is missing an @Override annotation. 3 183186
MissingOverride The method 'getTitle()' is missing an @Override annotation. 3 190193
MissingOverride The method 'getInfoForExport(String, String)' is missing an @Override annotation. 3 197200
MissingOverride The method 'getInfoForRecap(String, String)' is missing an @Override annotation. 3 204207
MissingOverride The method 'getInfoExtender(String, String)' is missing an @Override annotation. 3 211214
MissingOverride The method 'getInfoExtenderByList(List, String)' is missing an @Override annotation. 3 218221

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

Rule Violation Priority Line
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 Line
ImmutableField Private field '_userRatingLock' could be made final; it is only initialized in the declaration or constructor. 3 78
NPathComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has an NPath complexity of 384 3 105140
CyclomaticComplexity The method 'canVote(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 14. 3 105140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 196199
CyclomaticComplexity The method 'canIfRatingIsLimited(RatingExtenderConfig, LuteceUser, String, String)' has a cyclomatic complexity of 13. 3 265315
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 306309

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 527

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 1978
CyclomaticComplexity The method 'validateRating(HttpServletRequest, LuteceUser, String, String, float)' has a cyclomatic complexity of 10. 3 3064
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 38
CollapsibleIfStatements These nested if statements could be combined 3 5560

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

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

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 15113
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 15113
CommentRequired Enum comments are required 3 2449
CommentRequired Public method and constructor comments are required 3 3942
CommentRequired Public method and constructor comments are required 3 4447
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 96112

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34322
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
NPathComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has an NPath complexity of 810 3 103200
CyclomaticComplexity The method 'doRating(HttpServletRequest, HttpServletResponse)' has a cyclomatic complexity of 15. 3 103200
ConfusingTernary Avoid if (x != y) ..; else ..; 3 117
ConfusingTernary Avoid if (x != y) ..; else ..; 3 141159
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 212270
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 215217
ConfusingTernary Avoid if (x != y) ..; else ..; 3 251269
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 Line
UncommentedEmptyMethodBody Document empty method body 3 7677

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

Rule Violation Priority Line
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