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

Rule Violation Line
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 Line
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 Line
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 Line
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 Line
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 Line
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 '_demandDao' 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 Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 69–785

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

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 47–108

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

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 55–259

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

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

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

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 56–161
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 Line
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 Line
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 Line
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 Line
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 Line
ClassNamingConventions The utility class name 'SwaggerConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 39–80

Priority 2

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

Rule Violation Line
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 Line
AvoidReassigningParameters Avoid reassigning parameters such as 'strNotificationContent' 326

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

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

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

Rule Violation Line
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 Line
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 Line
AvoidReassigningParameters Avoid reassigning parameters such as 'strStatus' 193

Priority 3

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

Rule Violation Line
CommentRequired Header comments are required 50–331
AbstractClassWithoutAbstractMethod This abstract class does not have any abstract methods 50–331
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 54
CommentRequired Protected method constructor comments are required 81–95
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 148–154
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 Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 201–204

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

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

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

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 67–711
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. 584–585
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 Line
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. 138–139

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

Rule Violation Line
CommentRequired Public method and constructor comments are required 66–80
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 258–261

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

Rule Violation Line
CommentRequired Public method and constructor comments are required 185–188

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

Rule Violation Line
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–794
GodClass Possible God Class (WMC=48, ATFD=54, TCC=5.263%) 78–794
TooManyMethods This class has too many methods, consider refactoring it. 79–794
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _mapper field if you want a default access modifier 121
DefaultPackage Use explicit scoping instead of the default package private level 121
CyclomaticComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 14. 199–292
NPathComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has an NPath complexity of 4160 199–292
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 335–364
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 353
ShortVariable Avoid variables with short names like id 388
ShortVariable Avoid variables with short names like id 418
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 427
ConfusingTernary Avoid if (x != y) ..; else ..; 505
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 620
ConfusingTernary Avoid if (x != y) ..; else ..; 648
NPathComplexity The method 'loadByDemandListAndCustomerId(List, String, NotificationFilter)' has an NPath complexity of 225 675–744
CyclomaticComplexity The method 'loadByDemandListAndCustomerId(List, String, NotificationFilter)' has a cyclomatic complexity of 11. 675–744
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 691
ConfusingTernary Avoid if (x != y) ..; else ..; 726
ConfusingTernary Avoid if (x != y) ..; else ..; 762
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 784–791

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

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 59–448
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 ..; 145–155
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 342–386
NPathComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has an NPath complexity of 384 394–432
CyclomaticComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has a cyclomatic complexity of 11. 394–432
ShortVariable Avoid variables with short names like i 397
MissingOverride The method 'deleteBeforeDate(long)' is missing an @Override annotation. 437–447

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

Rule Violation Line
ShortVariable Avoid variables with short names like id 92

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

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 53–278
ConfusingTernary Avoid if (x != y) ..; else ..; 77
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 192–195

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

Rule Violation Line
CommentRequired Public method and constructor comments are required 166–169

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

Rule Violation Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 71–467
UnusedPrivateField Avoid unused private fields such as '_statusDao'. 76
MissingOverride The method 'findByCustomerId(String)' is missing an @Override annotation. 120–132
MissingOverride The method 'findByReference(String)' is missing an @Override annotation. 141–153
MissingOverride The method 'findByPrimaryKey(String, String, String)' is missing an @Override annotation. 164–175
MissingOverride The method 'create(Demand)' is missing an @Override annotation. 184–192
MissingOverride The method 'create(Notification)' is missing an @Override annotation. 201–212
MissingOverride The method 'create(NotificationEvent)' is missing an @Override annotation. 220–225
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notificationDao' 224
MissingOverride The method 'update(Demand)' is missing an @Override annotation. 234–242
MissingOverride The method 'updateDemandsStatusId(int, int)' is missing an @Override annotation. 252–255
MissingOverride The method 'remove(String, String, String)' is missing an @Override annotation. 265–277
MissingOverride The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. 289–299
MissingOverride The method 'getDemandTypesList()' is missing an @Override annotation. 330–343
MissingOverride The method 'getDemandType(String)' is missing an @Override annotation. 350–367
ShortVariable Avoid variables with short names like dt 352
ConfusingTernary Avoid if (x != y) ..; else ..; 354–366
MissingOverride The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. 375–378
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 Line
CommentRequired Header comments are required 43–105
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 47
NonThreadSafeSingleton Singleton is not thread safe 56–59

fr/paris/lutece/plugins/notificationstore/service/JsonGeneration.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. 62–160
CommentRequired Public method and constructor comments are required 69–103
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–785
CyclomaticComplexity The class 'NotificationService' has a total cyclomatic complexity of 91 (highest 15). 69–785
CommentRequired Header comments are required 69–785
GodClass Possible God Class (WMC=91, ATFD=108, TCC=11.111%) 69–785
TooManyMethods This class has too many methods, consider refactoring it. 70–785
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 124–132
CyclomaticComplexity The method 'newNotification(String)' has a cyclomatic complexity of 10. 142–206
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 180–183
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 180
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 180
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 188–191
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 192–195
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 192
CyclomaticComplexity The method 'processCustomer(Notification, List)' has a cyclomatic complexity of 15. 245–314
NPathComplexity The method 'processCustomer(Notification, List)' has an NPath complexity of 230 245–314
ConfusingTernary Avoid if (x != y) ..; else ..; 280–292
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. 331–332
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 372
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 391
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 391–394
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 391
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 399–402
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 399
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 426–429
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 426
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 426
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 434–437
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 434
CyclomaticComplexity The method 'store(Notification)' has a cyclomatic complexity of 13. 469–530
ConfusingTernary Avoid if (x != y) ..; else ..; 550–557
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
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 685
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 685
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 686
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 686
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 686
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 687
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 687
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 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
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 701
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. 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 Line
UncommentedEmptyMethodBody Document empty method body 54–55

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

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 57–60
NonThreadSafeSingleton Singleton is not thread safe 69–72

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

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 79–84
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 Line
CommentRequired Header comments are required 36–113
ShortVariable Avoid variables with short names like ID 55

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

Rule Violation Line
CommentRequired Header comments are required 51–247
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 82
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 132
DefaultPackage Use explicit scoping instead of the default package private level 134–137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getPluginDefaultNumberOfItemPerPage method if you want a default access modifier 134–137
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 Line
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 116
DefaultPackage Use explicit scoping instead of the default package private level 116

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

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

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

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

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

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

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

Rule Violation Line
CommentRequired Header comments are required 58–197
NPathComplexity The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 27776 104–184
CyclomaticComplexity The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 21. 104–184
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 135–138
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 145–148
DefaultPackage Use explicit scoping instead of the default package private level 186–196
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 187–196

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

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

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

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 58–207
CommentRequired Header comments are required 58–207
NPathComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 100–197
CyclomaticComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. 100–197
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 134–137
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 144–147
DefaultPackage Use explicit scoping instead of the default package private level 199–206
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 200–206

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

Rule Violation Line
CommentRequired Header comments are required 59–228
CyclomaticComplexity The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. 103–190
NPathComplexity The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 103–190
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 137–140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 147–150
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 218–226
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 219–226

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

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

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

Rule Violation Line
ShortVariable Avoid variables with short names like id 153
ConfusingTernary Avoid if (x != y) ..; else ..; 167–184
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–305
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 111–117
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. 160–167
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 216–232
ConfusingTernary Avoid if (x != y) ..; else ..; 246–260

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–301
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 147–151
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 194–199
ConfusingTernary Avoid if (x != y) ..; else ..; 209–228

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–288
CommentRequired Header comments are required 72–288
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 88–93
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 170–174

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

Rule Violation Line
CommentRequired Header comments are required 47–49

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

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

Priority 4

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

Rule Violation Line
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 Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 41

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

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

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

Rule Violation Line
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 Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 45

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

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

Files

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 50–331
AbstractClassWithoutAbstractMethod This abstract class does not have any abstract methods 3 50–331
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 81–95
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 148–154
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 Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 201–204

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

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

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

Rule Violation Priority Line
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 67–711
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 584–585
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 Line
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 138–139

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

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 66–80
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 258–261

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

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

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

Rule Violation Priority Line
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 Line
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–794
GodClass Possible God Class (WMC=48, ATFD=54, TCC=5.263%) 3 78–794
TooManyMethods This class has too many methods, consider refactoring it. 3 79–794
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _mapper field if you want a default access modifier 3 121
DefaultPackage Use explicit scoping instead of the default package private level 3 121
CyclomaticComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 14. 3 199–292
NPathComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has an NPath complexity of 4160 3 199–292
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 335–364
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 353
ShortVariable Avoid variables with short names like id 3 388
ShortVariable Avoid variables with short names like id 3 418
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 427
ConfusingTernary Avoid if (x != y) ..; else ..; 3 505
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 620
ConfusingTernary Avoid if (x != y) ..; else ..; 3 648
NPathComplexity The method 'loadByDemandListAndCustomerId(List, String, NotificationFilter)' has an NPath complexity of 225 3 675–744
CyclomaticComplexity The method 'loadByDemandListAndCustomerId(List, String, NotificationFilter)' has a cyclomatic complexity of 11. 3 675–744
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 691
ConfusingTernary Avoid if (x != y) ..; else ..; 3 726
ConfusingTernary Avoid if (x != y) ..; else ..; 3 762
SimplifyBooleanReturns Avoid unnecessary if..then..else statements when returning booleans 3 784–791

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

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 59–448
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 145–155
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 342–386
NPathComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has an NPath complexity of 384 3 394–432
CyclomaticComplexity The method 'addFilterCriteriaValues(DAOUtil, NotificationFilter)' has a cyclomatic complexity of 11. 3 394–432
ShortVariable Avoid variables with short names like i 3 397
MissingOverride The method 'deleteBeforeDate(long)' is missing an @Override annotation. 3 437–447

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

Rule Violation Priority Line
ShortVariable Avoid variables with short names like id 3 92

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

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 53–278
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 192–195

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

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 166–169

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

Rule Violation Priority Line
FieldNamingConventions The static field name 'bIsInitialized' doesn't match '_[a-z][a-zA-Z0-9]*' 1 86
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 3 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 Line
TooManyMethods This class has too many methods, consider refactoring it. 3 71–467
UnusedPrivateField Avoid unused private fields such as '_statusDao'. 3 76
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 '_demandDao' 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 120–132
MissingOverride The method 'findByReference(String)' is missing an @Override annotation. 3 141–153
MissingOverride The method 'findByPrimaryKey(String, String, String)' is missing an @Override annotation. 3 164–175
MissingOverride The method 'create(Demand)' is missing an @Override annotation. 3 184–192
MissingOverride The method 'create(Notification)' is missing an @Override annotation. 3 201–212
MissingOverride The method 'create(NotificationEvent)' is missing an @Override annotation. 3 220–225
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 234–242
MissingOverride The method 'updateDemandsStatusId(int, int)' is missing an @Override annotation. 3 252–255
MissingOverride The method 'remove(String, String, String)' is missing an @Override annotation. 3 265–277
MissingOverride The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. 3 289–299
MissingOverride The method 'getDemandTypesList()' is missing an @Override annotation. 3 330–343
FormalParameterNamingConventions The method parameter name 'type_id' doesn't match '[a-z][a-zA-Z0-9]*' 1 350
MissingOverride The method 'getDemandType(String)' is missing an @Override annotation. 3 350–367
ShortVariable Avoid variables with short names like dt 3 352
ConfusingTernary Avoid if (x != y) ..; else ..; 3 354–366
MissingOverride The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. 3 375–378
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 Line
CommentRequired Header comments are required 3 43–105
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 3 47
NonThreadSafeSingleton Singleton is not thread safe 3 56–59

fr/paris/lutece/plugins/notificationstore/service/JsonGeneration.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 62–160
CommentRequired Public method and constructor comments are required 3 69–103
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–785
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
CyclomaticComplexity The class 'NotificationService' has a total cyclomatic complexity of 91 (highest 15). 3 69–785
CommentRequired Header comments are required 3 69–785
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 69–785
GodClass Possible God Class (WMC=91, ATFD=108, TCC=11.111%) 3 69–785
TooManyMethods This class has too many methods, consider refactoring it. 3 70–785
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 124–132
CyclomaticComplexity The method 'newNotification(String)' has a cyclomatic complexity of 10. 3 142–206
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 180–183
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 180
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 180
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 188–191
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 192–195
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 192
CyclomaticComplexity The method 'processCustomer(Notification, List)' has a cyclomatic complexity of 15. 3 245–314
NPathComplexity The method 'processCustomer(Notification, List)' has an NPath complexity of 230 3 245–314
ConfusingTernary Avoid if (x != y) ..; else ..; 3 280–292
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 331–332
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
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 391
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 391–394
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 391
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 399–402
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 399
GuardLogStatement Logger calls should be surrounded by log level guards. 2 417
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 426–429
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 426
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 426
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 434–437
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 434
CyclomaticComplexity The method 'store(Notification)' has a cyclomatic complexity of 13. 3 469–530
ConfusingTernary Avoid if (x != y) ..; else ..; 3 550–557
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
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 685
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 686
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 686
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 686
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 687
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 687
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 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
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 701
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 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 Line
UncommentedEmptyMethodBody Document empty method body 3 54–55

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

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 47–108
CallSuperInConstructor It is a good practice to call super() in a constructor 3 57–60
NonThreadSafeSingleton Singleton is not thread safe 3 69–72

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

Rule Violation Priority Line
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 55–259
NonThreadSafeSingleton Singleton is not thread safe 3 79–84
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 Line
ClassNamingConventions The utility class name 'NotificationStoreConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 36–113
CommentRequired Header comments are required 3 36–113
ShortVariable Avoid variables with short names like ID 3 55

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

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 56–161
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 Line
CommentRequired Header comments are required 3 51–247
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 82
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 132
DefaultPackage Use explicit scoping instead of the default package private level 3 134–137
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getPluginDefaultNumberOfItemPerPage method if you want a default access modifier 3 134–137
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
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 245
FormalParameterNamingConventions The method parameter name '_mapFilterCriteria' doesn't match '[a-z][a-zA-Z0-9]*' 1 245

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

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

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

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

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

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

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

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62–301
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 140–147
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 141–147
ConfusingTernary Avoid if (x != y) ..; else ..; 3 167

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 58–197
NPathComplexity The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 27776 3 104–184
CyclomaticComplexity The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 21. 3 104–184
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 135–138
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 145–148
DefaultPackage Use explicit scoping instead of the default package private level 3 186–196
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 187–196

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

Rule Violation Priority Line
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 138–145
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 139–145
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 Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 58–207
CommentRequired Header comments are required 3 58–207
NPathComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 3 100–197
CyclomaticComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. 3 100–197
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 134–137
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 144–147
DefaultPackage Use explicit scoping instead of the default package private level 3 199–206
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 200–206

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 59–228
CyclomaticComplexity The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. 3 103–190
NPathComplexity The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 3 103–190
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 137–140
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 147–150
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 218–226
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 219–226

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

Rule Violation Priority Line
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 143–150
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 144–150
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 Line
ShortVariable Avoid variables with short names like id 3 153
ConfusingTernary Avoid if (x != y) ..; else ..; 3 167–184
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–305
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 111–117
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 160–167
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 216–232
ConfusingTernary Avoid if (x != y) ..; else ..; 3 246–260

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–301
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 147–151
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 194–199
ConfusingTernary Avoid if (x != y) ..; else ..; 3 209–228

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–288
CommentRequired Header comments are required 3 72–288
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 88–93
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 170–174

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 47–49

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

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