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/notificationstore/business/AbstractFilterDao.java

Rule Violation Ligne
FieldNamingConventions The constant name '_listPrefixToRemove' doesn't match '[A-Z][A-Z_0-9]*' 74
FieldNamingConventions The constant name '_listTypeAllowedForSearch' doesn't match '[A-Z][A-Z_0-9]*' 75
FieldNamingConventions The final field name '_clazz' doesn't match '[a-z][a-zA-Z0-9]*' 77
ConstructorCallsOverridableMethod Overridable method 'initMapSql' called during object construction 94
FormalParameterNamingConventions The method parameter name 'SQL_QUERY_SELECTALL_ID' doesn't match '[a-z][a-zA-Z0-9]*' 109
LocalVariableNamingConventions The local variable name 'WhereClauses' doesn't match '[a-z][a-zA-Z0-9]*' 133

fr/paris/lutece/plugins/notificationstore/business/DemandDAO.java

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

fr/paris/lutece/plugins/notificationstore/business/DemandTypeHome.java

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

fr/paris/lutece/plugins/notificationstore/business/TemporaryStatusDAO.java

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

fr/paris/lutece/plugins/notificationstore/service/CustomerProvider.java

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

fr/paris/lutece/plugins/notificationstore/service/DemandService.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_demandDao' doesn't match '[a-z][a-zA-Z0-9]*' 101
FormalParameterNamingConventions The method parameter name '_notificationEventDao' doesn't match '[a-z][a-zA-Z0-9]*' 101
FormalParameterNamingConventions The method parameter name '_notificationDao' doesn't match '[a-z][a-zA-Z0-9]*' 101
FormalParameterNamingConventions The method parameter name '_statusDao' doesn't match '[a-z][a-zA-Z0-9]*' 102
FormalParameterNamingConventions The method parameter name 'type_id' doesn't match '[a-z][a-zA-Z0-9]*' 350

fr/paris/lutece/plugins/notificationstore/service/NotificationService.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 69784

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusCacheService.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 47108

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusService.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 55259

fr/paris/lutece/plugins/notificationstore/utils/NotificationStoreConstants.java

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

fr/paris/lutece/plugins/notificationstore/utils/NotificationStoreUtils.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 56161
FieldNamingConventions The static field name 'hashMapTypeRef' doesn't match '_[a-z][a-zA-Z0-9]*' 61

fr/paris/lutece/plugins/notificationstore/web/AbstractJspBean.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_model' doesn't match '[a-z][a-zA-Z0-9]*' 224
FormalParameterNamingConventions The method parameter name '_mapFilterCriteria' doesn't match '[a-z][a-zA-Z0-9]*' 245

fr/paris/lutece/plugins/notificationstore/web/DemandTypeJspBean.java

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

fr/paris/lutece/plugins/notificationstore/web/StatusJspBean.java

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

fr/paris/lutece/plugins/notificationstore/web/rs/DemandTypeRestService.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_mapper' doesn't match '[a-z][a-zA-Z0-9]*' 114

fr/paris/lutece/plugins/notificationstore/web/rs/swagger/SwaggerConstants.java

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

Priority 2

fr/paris/lutece/plugins/notificationstore/business/DemandDAO.java

Rule Violation Ligne
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 446
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 467

fr/paris/lutece/plugins/notificationstore/business/NotificationContentHome.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strNotificationContent' 326

fr/paris/lutece/plugins/notificationstore/service/CustomerProvider.java

Rule Violation Ligne
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 232

fr/paris/lutece/plugins/notificationstore/service/JsonGeneration.java

Rule Violation Ligne
SystemPrintln System.out.println is used 80
SystemPrintln System.out.println is used 100
SystemPrintln System.out.println is used 157

fr/paris/lutece/plugins/notificationstore/service/NotificationService.java

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 361
GuardLogStatement Logger calls should be surrounded by log level guards. 417
GuardLogStatement Logger calls should be surrounded by log level guards. 757

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusService.java

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strStatus' 193

Priority 3

fr/paris/lutece/plugins/notificationstore/business/AbstractFilterDao.java

Rule Violation Ligne
CommentRequired Header comments are required 50331
AbstractClassWithoutAbstractMethod This abstract class does not have any abstract methods 50331
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 54
CommentRequired Protected method constructor comments are required 8195
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 114
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 115
CollapsibleIfStatements These nested if statements could be combined 148154
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 179
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 180

fr/paris/lutece/plugins/notificationstore/business/DemandCategoryDAO.java

Rule Violation Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 201204

fr/paris/lutece/plugins/notificationstore/business/DemandCategoryHome.java

Rule Violation Ligne
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 154

fr/paris/lutece/plugins/notificationstore/business/DemandDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 67711
AvoidDuplicateLiterals The String literal "SELECT " appears 6 times in this file; the first occurrence is on line 86 86
UnusedPrivateField Avoid unused private fields such as '_mapper'. 134
UnusedPrivateField Avoid unused private fields such as 'hashMapTypeRef'. 137
ControlStatementBraces This statement should have braces 196
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 315
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 316
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 319
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 345
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 348
ConfusingTernary Avoid if (x != y) ..; else ..; 495
ConfusingTernary Avoid if (x != y) ..; else ..; 496
ConfusingTernary Avoid if (x != y) ..; else ..; 499
ShortVariable Avoid variables with short names like i 550
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 584585
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 592
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 597
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 604
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 608
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 613
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 650
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 657
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 658
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 664
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 667

fr/paris/lutece/plugins/notificationstore/business/DemandHome.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 54
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 138139

fr/paris/lutece/plugins/notificationstore/business/DemandTypeDAO.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 6680
AvoidDuplicateLiterals The String literal "String" appears 4 times in this file; the first occurrence is on line 76 76
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 258261

fr/paris/lutece/plugins/notificationstore/business/DemandTypeHome.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 185188

fr/paris/lutece/plugins/notificationstore/business/NotificationContentDAO.java

Rule Violation Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 74
ConfusingTernary Avoid if (x != y) ..; else ..; 75
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 189

fr/paris/lutece/plugins/notificationstore/business/NotificationDAO.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34718
TooManyMethods This class has too many methods, consider refactoring it. 79718
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _mapper field if you want a default access modifier 117
DefaultPackage Use explicit scoping instead of the default package private level 117
NPathComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has an NPath complexity of 4160 195288
CyclomaticComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 14. 195288
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 331360
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 349
ShortVariable Avoid variables with short names like id 384
ShortVariable Avoid variables with short names like id 414
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 423
ConfusingTernary Avoid if (x != y) ..; else ..; 501
CyclomaticComplexity The method 'loadByDemandIdTypeIdCustomerId(String, String, String, NotificationFilter)' has a cyclomatic complexity of 10. 610668
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 622
ConfusingTernary Avoid if (x != y) ..; else ..; 654
ConfusingTernary Avoid if (x != y) ..; else ..; 686
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 708715

fr/paris/lutece/plugins/notificationstore/business/NotificationEventDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 59448
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 89
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 104
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 129
ConfusingTernary Avoid if (x != y) ..; else ..; 145155
ConfusingTernary Avoid if (x != y) ..; else ..; 310
ConfusingTernary Avoid if (x != y) ..; else ..; 331
LinguisticNaming Linguistics Antipattern - The getter 'getFilterCriteriaClauses' should not return void linguistically 342386
CyclomaticComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has a cyclomatic complexity of 11. 394432
NPathComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has an NPath complexity of 384 394432
ShortVariable Avoid variables with short names like i 397
MissingOverride The method 'deleteBeforeDate(long)' is missing an @Override annotation. 437447

fr/paris/lutece/plugins/notificationstore/business/NotificationHome.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 91

fr/paris/lutece/plugins/notificationstore/business/TemporaryStatusDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 53278
ConfusingTernary Avoid if (x != y) ..; else ..; 77
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 192195

fr/paris/lutece/plugins/notificationstore/business/TemporaryStatusHome.java

Rule Violation Ligne
CommentRequired Public method and constructor comments are required 166169

fr/paris/lutece/plugins/notificationstore/service/CustomerProvider.java

Rule Violation Ligne
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 86
ImmutableField Private field '_requestAuthor' could be made final; it is only initialized in the declaration or constructor. 90

fr/paris/lutece/plugins/notificationstore/service/DemandService.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 71467
UnusedPrivateField Avoid unused private fields such as '_statusDao'. 76
MissingOverride The method 'findByCustomerId(String)' is missing an @Override annotation. 120132
MissingOverride The method 'findByReference(String)' is missing an @Override annotation. 141153
MissingOverride The method 'findByPrimaryKey(String, String, String)' is missing an @Override annotation. 164175
MissingOverride The method 'create(Demand)' is missing an @Override annotation. 184192
MissingOverride The method 'create(Notification)' is missing an @Override annotation. 201212
MissingOverride The method 'create(NotificationEvent)' is missing an @Override annotation. 220225
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notificationDao' 224
MissingOverride The method 'update(Demand)' is missing an @Override annotation. 234242
MissingOverride The method 'updateDemandsStatusId(int, int)' is missing an @Override annotation. 252255
MissingOverride The method 'remove(String, String, String)' is missing an @Override annotation. 265277
MissingOverride The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. 289299
MissingOverride The method 'getDemandTypesList()' is missing an @Override annotation. 330343
MissingOverride The method 'getDemandType(String)' is missing an @Override annotation. 350367
ShortVariable Avoid variables with short names like dt 352
ConfusingTernary Avoid if (x != y) ..; else ..; 354366
MissingOverride The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. 375378
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 450

fr/paris/lutece/plugins/notificationstore/service/DemandTypeService.java

Rule Violation Ligne
CommentRequired Header comments are required 43101
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 47
NonThreadSafeSingleton Singleton is not thread safe 5659

fr/paris/lutece/plugins/notificationstore/service/JsonGeneration.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. 62160
CommentRequired Public method and constructor comments are required 69103
ShortVariable Avoid variables with short names like i 83
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 94

fr/paris/lutece/plugins/notificationstore/service/NotificationService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34784
CommentRequired Header comments are required 69784
GodClass Possible God Class (WMC=91, ATFD=107, TCC=11.111%) 69784
CyclomaticComplexity The class 'NotificationService' has a total cyclomatic complexity of 91 (highest 15). 69784
TooManyMethods This class has too many methods, consider refactoring it. 70784
UnusedPrivateField Avoid unused private fields such as 'STATUS_SUCCESS'. 83
UnusedPrivateField Avoid unused private fields such as 'MESSAGE_MISSING_USER_ID'. 97
NonThreadSafeSingleton Singleton is not thread safe 124132
CyclomaticComplexity The method 'newNotification(String)' has a cyclomatic complexity of 10. 142206
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 180
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 180
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 180183
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 188191
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 192
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 192195
NPathComplexity The method 'processCustomer(Notification, List)' has an NPath complexity of 230 245314
CyclomaticComplexity The method 'processCustomer(Notification, List)' has a cyclomatic complexity of 15. 245314
ConfusingTernary Avoid if (x != y) ..; else ..; 280292
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 294
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 296
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 331332
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 372
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 391
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 391
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 391394
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 399
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 399402
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 426
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 426
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 426429
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 434
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 434437
CyclomaticComplexity The method 'store(Notification)' has a cyclomatic complexity of 13. 469530
ConfusingTernary Avoid if (x != y) ..; else ..; 550557
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 614
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 621
ShortMethodName Avoid using short method names 643
ShortVariable Avoid variables with short names like ex 657
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 667
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 170 characters appended. 683
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 684
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 3 consecutive times with literals. Use a single append with a single combined String. 684
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 685
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 685
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 686
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 686
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 686
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 687
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 687
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 687
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 688
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 688
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 688
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 689
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 693
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 693
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 694
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 700
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 700
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 701
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 701
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 702
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 702
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 703
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 703
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notification' 766

fr/paris/lutece/plugins/notificationstore/service/NotificationStorePlugin.java

Rule Violation Ligne
UncommentedEmptyMethodBody Document empty method body 5455

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusCacheService.java

Rule Violation Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 5760
NonThreadSafeSingleton Singleton is not thread safe 6972

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusService.java

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 7984
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 138
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 197
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 203

fr/paris/lutece/plugins/notificationstore/utils/NotificationStoreConstants.java

Rule Violation Ligne
CommentRequired Header comments are required 36113
ShortVariable Avoid variables with short names like ID 55

fr/paris/lutece/plugins/notificationstore/web/AbstractJspBean.java

Rule Violation Ligne
CommentRequired Header comments are required 51247
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 82
DefaultPackage Use explicit scoping instead of the default package private level 132
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 132
DefaultPackage Use explicit scoping instead of the default package private level 134137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getPluginDefaultNumberOfItemPerPage method if you want a default access modifier 134137
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 144
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 157
CompareObjectsWithEquals Use equals() to compare object references. 192
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 245

fr/paris/lutece/plugins/notificationstore/web/AbstractManageDemandJspBean.java

Rule Violation Ligne
DefaultPackage Use explicit scoping instead of the default package private level 116
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 116

fr/paris/lutece/plugins/notificationstore/web/AbstractManageDemandTypeJspBean.java

Rule Violation Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 120
DefaultPackage Use explicit scoping instead of the default package private level 120

fr/paris/lutece/plugins/notificationstore/web/AbstractManageJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 49116
DefaultPackage Use explicit scoping instead of the default package private level 115
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 115

fr/paris/lutece/plugins/notificationstore/web/DemandCategoryJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62301
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 122
DefaultPackage Use explicit scoping instead of the default package private level 140147
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 141147
ConfusingTernary Avoid if (x != y) ..; else ..; 167

fr/paris/lutece/plugins/notificationstore/web/DemandJspBean.java

Rule Violation Ligne
CommentRequired Header comments are required 58197
CyclomaticComplexity The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 21. 104184
NPathComplexity The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 27776 104184
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 135138
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 145148
DefaultPackage Use explicit scoping instead of the default package private level 186196
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 187196

fr/paris/lutece/plugins/notificationstore/web/DemandTypeJspBean.java

Rule Violation Ligne
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 126
DefaultPackage Use explicit scoping instead of the default package private level 138145
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 139145
ConfusingTernary Avoid if (x != y) ..; else ..; 166

fr/paris/lutece/plugins/notificationstore/web/NotificationEventJspBean.java

Rule Violation Ligne
CommentRequired Header comments are required 58207
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 58207
CyclomaticComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. 100197
NPathComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 100197
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 134137
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 144147
DefaultPackage Use explicit scoping instead of the default package private level 199206
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 200206

fr/paris/lutece/plugins/notificationstore/web/NotificationJspBean.java

Rule Violation Ligne
CommentRequired Header comments are required 59228
NPathComplexity The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 103190
CyclomaticComplexity The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. 103190
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 137140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 147150
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 200
DefaultPackage Use explicit scoping instead of the default package private level 218226
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 219226

fr/paris/lutece/plugins/notificationstore/web/StatusJspBean.java

Rule Violation Ligne
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 130
DefaultPackage Use explicit scoping instead of the default package private level 143150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 144150
ConfusingTernary Avoid if (x != y) ..; else ..; 162

fr/paris/lutece/plugins/notificationstore/web/rs/DemandCategoryRestService.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 153
ConfusingTernary Avoid if (x != y) ..; else ..; 167184
ShortVariable Avoid variables with short names like id 199
ShortVariable Avoid variables with short names like id 230

fr/paris/lutece/plugins/notificationstore/web/rs/DemandRestService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34305
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 111117
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 119
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 160167
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 169
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 182
CommentRequired Public method and constructor comments are required 216232
ConfusingTernary Avoid if (x != y) ..; else ..; 246260

fr/paris/lutece/plugins/notificationstore/web/rs/DemandTypeRestService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34301
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 147151
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 194199
ConfusingTernary Avoid if (x != y) ..; else ..; 209228

fr/paris/lutece/plugins/notificationstore/web/rs/NotificationRestService.java

Rule Violation Ligne
CommentRequired Header comments are required 71227
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 8792
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 169173

fr/paris/lutece/plugins/notificationstore/web/rs/swagger/SwaggerConfig.java

Rule Violation Ligne
CommentRequired Header comments are required 4749

fr/paris/lutece/plugins/notificationstore/web/rs/swagger/SwaggerConstants.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like ID 47

Priority 4

fr/paris/lutece/plugins/notificationstore/business/DemandDAO.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 42
UnusedImports Avoid unused imports such as 'java.util.Map' 52
UnusedImports Avoid unused imports such as 'com.fasterxml.jackson.core.JsonProcessingException' 57
UnusedImports Avoid unused imports such as 'com.fasterxml.jackson.databind.JsonMappingException' 60

fr/paris/lutece/plugins/notificationstore/business/DemandHome.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 41

fr/paris/lutece/plugins/notificationstore/business/NotificationContentHome.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 49

fr/paris/lutece/plugins/notificationstore/service/NotificationService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'java.time.LocalDateTime' 62
UnusedImports Avoid unused imports such as 'java.time.ZoneId' 63
UnusedImports Avoid unused imports such as 'java.time.format.DateTimeFormatter' 64

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 45

fr/paris/lutece/plugins/notificationstore/web/DemandTypeJspBean.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'com.google.common.html.HtmlEscapers' 36
UnusedImports Avoid unused imports such as 'freemarker.template.utility.HtmlEscape' 50
UnusedImports Avoid unused imports such as 'org.apache.tika.parser.html.HtmlParser' 52

Fichiers

fr/paris/lutece/plugins/notificationstore/business/AbstractFilterDao.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 50331
AbstractClassWithoutAbstractMethod This abstract class does not have any abstract methods 3 50331
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 54
FieldNamingConventions The constant name '_listPrefixToRemove' doesn't match '[A-Z][A-Z_0-9]*' 1 74
FieldNamingConventions The constant name '_listTypeAllowedForSearch' doesn't match '[A-Z][A-Z_0-9]*' 1 75
FieldNamingConventions The final field name '_clazz' doesn't match '[a-z][a-zA-Z0-9]*' 1 77
CommentRequired Protected method constructor comments are required 3 8195
ConstructorCallsOverridableMethod Overridable method 'initMapSql' called during object construction 1 94
FormalParameterNamingConventions The method parameter name 'SQL_QUERY_SELECTALL_ID' doesn't match '[a-z][a-zA-Z0-9]*' 1 109
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 114
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 115
LocalVariableNamingConventions The local variable name 'WhereClauses' doesn't match '[a-z][a-zA-Z0-9]*' 1 133
CollapsibleIfStatements These nested if statements could be combined 3 148154
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 179
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 180

fr/paris/lutece/plugins/notificationstore/business/DemandCategoryDAO.java

Rule Violation Priority Ligne
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 201204

fr/paris/lutece/plugins/notificationstore/business/DemandCategoryHome.java

Rule Violation Priority Ligne
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 3 154

fr/paris/lutece/plugins/notificationstore/business/DemandDAO.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 4 42
UnusedImports Avoid unused imports such as 'java.util.Map' 4 52
UnusedImports Avoid unused imports such as 'com.fasterxml.jackson.core.JsonProcessingException' 4 57
UnusedImports Avoid unused imports such as 'com.fasterxml.jackson.databind.JsonMappingException' 4 60
TooManyMethods This class has too many methods, consider refactoring it. 3 67711
AvoidDuplicateLiterals The String literal "SELECT " appears 6 times in this file; the first occurrence is on line 86 3 86
UnusedPrivateField Avoid unused private fields such as '_mapper'. 3 134
UnusedPrivateField Avoid unused private fields such as 'hashMapTypeRef'. 3 137
FieldNamingConventions The static field name 'hashMapTypeRef' doesn't match '_[a-z][a-zA-Z0-9]*' 1 137
ControlStatementBraces This statement should have braces 3 196
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 315
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 316
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 319
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 345
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 348
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 446
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 467
ConfusingTernary Avoid if (x != y) ..; else ..; 3 495
ConfusingTernary Avoid if (x != y) ..; else ..; 3 496
ConfusingTernary Avoid if (x != y) ..; else ..; 3 499
ShortVariable Avoid variables with short names like i 3 550
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 584585
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 592
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 597
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 604
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 608
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 613
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 650
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 657
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 658
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 664
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 667

fr/paris/lutece/plugins/notificationstore/business/DemandHome.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 4 41
UnusedPrivateField Avoid unused private fields such as '_plugin'. 3 54
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 138139

fr/paris/lutece/plugins/notificationstore/business/DemandTypeDAO.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 6680
AvoidDuplicateLiterals The String literal "String" appears 4 times in this file; the first occurrence is on line 76 3 76
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 258261

fr/paris/lutece/plugins/notificationstore/business/DemandTypeHome.java

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

fr/paris/lutece/plugins/notificationstore/business/NotificationContentDAO.java

Rule Violation Priority Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 3 74
ConfusingTernary Avoid if (x != y) ..; else ..; 3 75
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 189

fr/paris/lutece/plugins/notificationstore/business/NotificationContentHome.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 4 49
AvoidReassigningParameters Avoid reassigning parameters such as 'strNotificationContent' 2 326

fr/paris/lutece/plugins/notificationstore/business/NotificationDAO.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34718
TooManyMethods This class has too many methods, consider refactoring it. 3 79718
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _mapper field if you want a default access modifier 3 117
DefaultPackage Use explicit scoping instead of the default package private level 3 117
NPathComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has an NPath complexity of 4160 3 195288
CyclomaticComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 14. 3 195288
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 331360
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 349
ShortVariable Avoid variables with short names like id 3 384
ShortVariable Avoid variables with short names like id 3 414
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 423
ConfusingTernary Avoid if (x != y) ..; else ..; 3 501
CyclomaticComplexity The method 'loadByDemandIdTypeIdCustomerId(String, String, String, NotificationFilter)' has a cyclomatic complexity of 10. 3 610668
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 622
ConfusingTernary Avoid if (x != y) ..; else ..; 3 654
ConfusingTernary Avoid if (x != y) ..; else ..; 3 686
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 708715

fr/paris/lutece/plugins/notificationstore/business/NotificationEventDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 59448
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 89
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 104
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 129
ConfusingTernary Avoid if (x != y) ..; else ..; 3 145155
ConfusingTernary Avoid if (x != y) ..; else ..; 3 310
ConfusingTernary Avoid if (x != y) ..; else ..; 3 331
LinguisticNaming Linguistics Antipattern - The getter 'getFilterCriteriaClauses' should not return void linguistically 3 342386
CyclomaticComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has a cyclomatic complexity of 11. 3 394432
NPathComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has an NPath complexity of 384 3 394432
ShortVariable Avoid variables with short names like i 3 397
MissingOverride The method 'deleteBeforeDate(long)' is missing an @Override annotation. 3 437447

fr/paris/lutece/plugins/notificationstore/business/NotificationHome.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 91

fr/paris/lutece/plugins/notificationstore/business/TemporaryStatusDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 53278
FieldNamingConventions The constant name '_plugin' doesn't match '[A-Z][A-Z_0-9]*' 1 65
ConfusingTernary Avoid if (x != y) ..; else ..; 3 77
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 192195

fr/paris/lutece/plugins/notificationstore/business/TemporaryStatusHome.java

Rule Violation Priority Ligne
CommentRequired Public method and constructor comments are required 3 166169

fr/paris/lutece/plugins/notificationstore/service/CustomerProvider.java

Rule Violation Priority Ligne
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 3 86
FieldNamingConventions The static field name 'bIsInitialized' doesn't match '_[a-z][a-zA-Z0-9]*' 1 86
ImmutableField Private field '_requestAuthor' could be made final; it is only initialized in the declaration or constructor. 3 90
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 232

fr/paris/lutece/plugins/notificationstore/service/DemandService.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 71467
UnusedPrivateField Avoid unused private fields such as '_statusDao'. 3 76
FormalParameterNamingConventions The method parameter name '_demandDao' doesn't match '[a-z][a-zA-Z0-9]*' 1 101
FormalParameterNamingConventions The method parameter name '_notificationEventDao' doesn't match '[a-z][a-zA-Z0-9]*' 1 101
FormalParameterNamingConventions The method parameter name '_notificationDao' doesn't match '[a-z][a-zA-Z0-9]*' 1 101
FormalParameterNamingConventions The method parameter name '_statusDao' doesn't match '[a-z][a-zA-Z0-9]*' 1 102
MissingOverride The method 'findByCustomerId(String)' is missing an @Override annotation. 3 120132
MissingOverride The method 'findByReference(String)' is missing an @Override annotation. 3 141153
MissingOverride The method 'findByPrimaryKey(String, String, String)' is missing an @Override annotation. 3 164175
MissingOverride The method 'create(Demand)' is missing an @Override annotation. 3 184192
MissingOverride The method 'create(Notification)' is missing an @Override annotation. 3 201212
MissingOverride The method 'create(NotificationEvent)' is missing an @Override annotation. 3 220225
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notificationDao' 3 224
MissingOverride The method 'update(Demand)' is missing an @Override annotation. 3 234242
MissingOverride The method 'updateDemandsStatusId(int, int)' is missing an @Override annotation. 3 252255
MissingOverride The method 'remove(String, String, String)' is missing an @Override annotation. 3 265277
MissingOverride The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. 3 289299
MissingOverride The method 'getDemandTypesList()' is missing an @Override annotation. 3 330343
MissingOverride The method 'getDemandType(String)' is missing an @Override annotation. 3 350367
FormalParameterNamingConventions The method parameter name 'type_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 350
ShortVariable Avoid variables with short names like dt 3 352
ConfusingTernary Avoid if (x != y) ..; else ..; 3 354366
MissingOverride The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. 3 375378
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 450

fr/paris/lutece/plugins/notificationstore/service/DemandTypeService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 43101
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 3 47
NonThreadSafeSingleton Singleton is not thread safe 3 5659

fr/paris/lutece/plugins/notificationstore/service/JsonGeneration.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 62160
CommentRequired Public method and constructor comments are required 3 69103
SystemPrintln System.out.println is used 2 80
ShortVariable Avoid variables with short names like i 3 83
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 94
SystemPrintln System.out.println is used 2 100
SystemPrintln System.out.println is used 2 157

fr/paris/lutece/plugins/notificationstore/service/NotificationService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34784
UnusedImports Avoid unused imports such as 'java.time.LocalDateTime' 4 62
UnusedImports Avoid unused imports such as 'java.time.ZoneId' 4 63
UnusedImports Avoid unused imports such as 'java.time.format.DateTimeFormatter' 4 64
CommentRequired Header comments are required 3 69784
GodClass Possible God Class (WMC=91, ATFD=107, TCC=11.111%) 3 69784
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 69784
CyclomaticComplexity The class 'NotificationService' has a total cyclomatic complexity of 91 (highest 15). 3 69784
TooManyMethods This class has too many methods, consider refactoring it. 3 70784
UnusedPrivateField Avoid unused private fields such as 'STATUS_SUCCESS'. 3 83
UnusedPrivateField Avoid unused private fields such as 'MESSAGE_MISSING_USER_ID'. 3 97
NonThreadSafeSingleton Singleton is not thread safe 3 124132
CyclomaticComplexity The method 'newNotification(String)' has a cyclomatic complexity of 10. 3 142206
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 180
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 180
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 180183
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 188191
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 192
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 192195
NPathComplexity The method 'processCustomer(Notification, List)' has an NPath complexity of 230 3 245314
CyclomaticComplexity The method 'processCustomer(Notification, List)' has a cyclomatic complexity of 15. 3 245314
ConfusingTernary Avoid if (x != y) ..; else ..; 3 280292
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 294
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 296
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 331332
GuardLogStatement Logger calls should be surrounded by log level guards. 2 361
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 372
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 391
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 391
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 391394
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 399
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 399402
GuardLogStatement Logger calls should be surrounded by log level guards. 2 417
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 426
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 426
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 426429
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 434
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 434437
CyclomaticComplexity The method 'store(Notification)' has a cyclomatic complexity of 13. 3 469530
ConfusingTernary Avoid if (x != y) ..; else ..; 3 550557
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 614
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 621
ShortMethodName Avoid using short method names 3 643
ShortVariable Avoid variables with short names like ex 3 657
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 667
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 170 characters appended. 3 683
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 684
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 3 consecutive times with literals. Use a single append with a single combined String. 3 684
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 685
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 685
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 686
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 686
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 686
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 687
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 687
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 687
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 688
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 688
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 688
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 689
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 693
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 693
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 694
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 700
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 700
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 701
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 701
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 702
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 702
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 703
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 703
GuardLogStatement Logger calls should be surrounded by log level guards. 2 757
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notification' 3 766

fr/paris/lutece/plugins/notificationstore/service/NotificationStorePlugin.java

Rule Violation Priority Ligne
UncommentedEmptyMethodBody Document empty method body 3 5455

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusCacheService.java

Rule Violation Priority Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47108
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5760
NonThreadSafeSingleton Singleton is not thread safe 3 6972

fr/paris/lutece/plugins/notificationstore/service/TemporaryStatusService.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 4 45
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 55259
NonThreadSafeSingleton Singleton is not thread safe 3 7984
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 138
AvoidReassigningParameters Avoid reassigning parameters such as 'strStatus' 2 193
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 197
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 203

fr/paris/lutece/plugins/notificationstore/utils/NotificationStoreConstants.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 36113
ClassNamingConventions The utility class name 'NotificationStoreConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 36113
ShortVariable Avoid variables with short names like ID 3 55

fr/paris/lutece/plugins/notificationstore/utils/NotificationStoreUtils.java

Rule Violation Priority Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 56161
FieldNamingConventions The static field name 'hashMapTypeRef' doesn't match '_[a-z][a-zA-Z0-9]*' 1 61

fr/paris/lutece/plugins/notificationstore/web/AbstractJspBean.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 51247
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 82
DefaultPackage Use explicit scoping instead of the default package private level 3 132
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 132
DefaultPackage Use explicit scoping instead of the default package private level 3 134137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getPluginDefaultNumberOfItemPerPage method if you want a default access modifier 3 134137
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 144
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 157
CompareObjectsWithEquals Use equals() to compare object references. 3 192
LocalVariableNamingConventions The local variable name '_model' doesn't match '[a-z][a-zA-Z0-9]*' 1 224
FormalParameterNamingConventions The method parameter name '_mapFilterCriteria' doesn't match '[a-z][a-zA-Z0-9]*' 1 245
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 245

fr/paris/lutece/plugins/notificationstore/web/AbstractManageDemandJspBean.java

Rule Violation Priority Ligne
DefaultPackage Use explicit scoping instead of the default package private level 3 116
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 116

fr/paris/lutece/plugins/notificationstore/web/AbstractManageDemandTypeJspBean.java

Rule Violation Priority Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 120
DefaultPackage Use explicit scoping instead of the default package private level 3 120

fr/paris/lutece/plugins/notificationstore/web/AbstractManageJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 49116
DefaultPackage Use explicit scoping instead of the default package private level 3 115
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 115

fr/paris/lutece/plugins/notificationstore/web/DemandCategoryJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62301
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 122
DefaultPackage Use explicit scoping instead of the default package private level 3 140147
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 141147
ConfusingTernary Avoid if (x != y) ..; else ..; 3 167

fr/paris/lutece/plugins/notificationstore/web/DemandJspBean.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 58197
CyclomaticComplexity The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 21. 3 104184
NPathComplexity The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 27776 3 104184
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 135138
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 145148
DefaultPackage Use explicit scoping instead of the default package private level 3 186196
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 187196

fr/paris/lutece/plugins/notificationstore/web/DemandTypeJspBean.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'com.google.common.html.HtmlEscapers' 4 36
UnusedImports Avoid unused imports such as 'freemarker.template.utility.HtmlEscape' 4 50
UnusedImports Avoid unused imports such as 'org.apache.tika.parser.html.HtmlParser' 4 52
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 126
DefaultPackage Use explicit scoping instead of the default package private level 3 138145
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 139145
FormalParameterNamingConventions The method parameter name '_mapFilterCriteria' doesn't match '[a-z][a-zA-Z0-9]*' 1 151
ConfusingTernary Avoid if (x != y) ..; else ..; 3 166

fr/paris/lutece/plugins/notificationstore/web/NotificationEventJspBean.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 58207
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 58207
CyclomaticComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. 3 100197
NPathComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 3 100197
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 134137
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 144147
DefaultPackage Use explicit scoping instead of the default package private level 3 199206
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 200206

fr/paris/lutece/plugins/notificationstore/web/NotificationJspBean.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 59228
NPathComplexity The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 3 103190
CyclomaticComplexity The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. 3 103190
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 137140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 147150
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 200
DefaultPackage Use explicit scoping instead of the default package private level 3 218226
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 219226

fr/paris/lutece/plugins/notificationstore/web/StatusJspBean.java

Rule Violation Priority Ligne
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 130
DefaultPackage Use explicit scoping instead of the default package private level 3 143150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 144150
ConfusingTernary Avoid if (x != y) ..; else ..; 3 162
FormalParameterNamingConventions The method parameter name '_mapFilterCriteria' doesn't match '[a-z][a-zA-Z0-9]*' 1 321

fr/paris/lutece/plugins/notificationstore/web/rs/DemandCategoryRestService.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 153
ConfusingTernary Avoid if (x != y) ..; else ..; 3 167184
ShortVariable Avoid variables with short names like id 3 199
ShortVariable Avoid variables with short names like id 3 230

fr/paris/lutece/plugins/notificationstore/web/rs/DemandRestService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34305
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 111117
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 119
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 160167
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 169
InefficientStringBuffering Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 3 182
CommentRequired Public method and constructor comments are required 3 216232
ConfusingTernary Avoid if (x != y) ..; else ..; 3 246260

fr/paris/lutece/plugins/notificationstore/web/rs/DemandTypeRestService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34301
LocalVariableNamingConventions The local variable name '_mapper' doesn't match '[a-z][a-zA-Z0-9]*' 1 114
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 147151
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 194199
ConfusingTernary Avoid if (x != y) ..; else ..; 3 209228

fr/paris/lutece/plugins/notificationstore/web/rs/NotificationRestService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 71227
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 8792
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 169173

fr/paris/lutece/plugins/notificationstore/web/rs/swagger/SwaggerConfig.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 4749

fr/paris/lutece/plugins/notificationstore/web/rs/swagger/SwaggerConstants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'SwaggerConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3980
ShortVariable Avoid variables with short names like ID 3 47