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/service/CustomerProvider.java

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

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

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

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)' 36102

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

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

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. 378
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 398

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

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

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. 240
GuardLogStatement Logger calls should be surrounded by log level guards. 278
GuardLogStatement Logger calls should be surrounded by log level guards. 584

Priority 3

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

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

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

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 56593
AvoidDuplicateLiterals The String literal "SELECT " appears 6 times in this file; the first occurrence is on line 73 73
ControlStatementBraces This statement should have braces 163
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 282
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 283
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 286
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 311
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 314
ConfusingTernary Avoid if (x != y) ..; else ..; 426
ConfusingTernary Avoid if (x != y) ..; else ..; 427
ConfusingTernary Avoid if (x != y) ..; else ..; 430
ShortVariable Avoid variables with short names like i 475
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 505
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 510
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 513
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 549
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 554
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 558
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 561

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

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 54

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

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

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

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 53

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

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

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. 34637
TooManyMethods This class has too many methods, consider refactoring it. 76637
DefaultPackage Use explicit scoping instead of the default package private level 108
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _mapper field if you want a default access modifier 108
NPathComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has an NPath complexity of 2080 185272
CyclomaticComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 13. 185272
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 311339
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 333
ShortVariable Avoid variables with short names like id 345
ShortVariable Avoid variables with short names like id 397
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 406
ConfusingTernary Avoid if (x != y) ..; else ..; 484
ConfusingTernary Avoid if (x != y) ..; else ..; 597
ConfusingTernary Avoid if (x != y) ..; else ..; 629

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

Rule Violation Ligne
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 85
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 100
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 125
ConfusingTernary Avoid if (x != y) ..; else ..; 141151
ConfusingTernary Avoid if (x != y) ..; else ..; 293
ConfusingTernary Avoid if (x != y) ..; else ..; 312
LinguisticNaming Linguistics Antipattern - The getter 'getFilterCriteriaClauses' should not return void linguistically 323357
ShortVariable Avoid variables with short names like i 368
MissingOverride The method 'deleteBeforeDate(long)' is missing an @Override annotation. 401411

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

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 56
ShortVariable Avoid variables with short names like id 96

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

Rule Violation Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 73
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 188191

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

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

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

Rule Violation Ligne
MissingOverride The method 'findByCustomerId(String)' is missing an @Override annotation. 7789
MissingOverride The method 'findByReference(String)' is missing an @Override annotation. 98110
MissingOverride The method 'findByPrimaryKey(String, String)' is missing an @Override annotation. 121131
MissingOverride The method 'create(Demand)' is missing an @Override annotation. 140148
MissingOverride The method 'create(Notification)' is missing an @Override annotation. 157168
MissingOverride The method 'create(NotificationEvent)' is missing an @Override annotation. 176181
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notificationDao' 180
MissingOverride The method 'update(Demand)' is missing an @Override annotation. 190198
MissingOverride The method 'remove(String, String)' is missing an @Override annotation. 208220
MissingOverride The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. 232242
MissingOverride The method 'getDemandTypesList()' is missing an @Override annotation. 249253
ShortVariable Avoid variables with short names like id 260
MissingOverride The method 'getDemandType(int)' is missing an @Override annotation. 260264
MissingOverride The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. 272275

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

Rule Violation Ligne
CommentRequired Header comments are required 821

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
GodClass Possible God Class (WMC=70, ATFD=70, TCC=9.167%) 68612
CommentRequired Header comments are required 68612
TooManyMethods This class has too many methods, consider refactoring it. 69612
NonThreadSafeSingleton Singleton is not thread safe 112117
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 162165
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 162
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 162
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 170
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 170173
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 241
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 287
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 287290
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 287
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 295
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 295298
CyclomaticComplexity The method 'store(Notification)' has a cyclomatic complexity of 14. 321382
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 471
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 478
ShortVariable Avoid variables with short names like ex 505
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 515
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 53 characters appended. 530
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 531
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 531
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 531
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 532
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 532
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 533
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 533
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 534
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 534
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notification' 593

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

Rule Violation Ligne
UncommentedEmptyMethodBody Document empty method body 5455

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

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

fr/paris/lutece/plugins/notificationstore/utils/NotificationStoreUtils.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. 57107

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
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 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 58194
NPathComplexity The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 5824 102173
CyclomaticComplexity The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 18. 102173
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 128131
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 138141
DefaultPackage Use explicit scoping instead of the default package private level 184193
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 185193

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

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

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

Rule Violation Ligne
CommentRequired Header comments are required 59209
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 59209
CyclomaticComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. 101199
NPathComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 101199
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 201208
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 202208

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

Rule Violation Ligne
CommentRequired Header comments are required 59229
CyclomaticComplexity The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. 103191
NPathComplexity The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 103191
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 201
DefaultPackage Use explicit scoping instead of the default package private level 219227
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 220227

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

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

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

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 134
ConfusingTernary Avoid if (x != y) ..; else ..; 147163
ShortVariable Avoid variables with short names like id 176
ShortVariable Avoid variables with short names like id 203

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. 34248
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 9094
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 96
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 127132
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 134
ConfusingTernary Avoid if (x != y) ..; else ..; 171185
ConfusingTernary Avoid if (x != y) ..; else ..; 229240

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

Rule Violation Ligne
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 114118
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 170175
ConfusingTernary Avoid if (x != y) ..; else ..; 186213

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

Rule Violation Ligne
CommentRequired Header comments are required 62147

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

Rule Violation Ligne
MissingStaticMethodInNonInstantiatableClass Class cannot be instantiated and does not provide any static methods or fields 71237

Priority 4

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/NotificationHome.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.file.IFileStoreServiceProvider' 40
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 42

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'java.util.HashMap' 50
UnusedImports Avoid unused imports such as 'org.glassfish.jersey.http.ResponseStatus' 57

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.demand.DemandStatus' 45

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.notificationstore.service.DemandService' 51

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.notification.EnumNotificationType' 53
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.web.rs.NotificationResult' 58

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.identitystore.v3.web.rs.util.Constants' 53

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.web.rs.responseStatus.ResponseStatus' 53

Fichiers

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

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

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

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 56593
AvoidDuplicateLiterals The String literal "SELECT " appears 6 times in this file; the first occurrence is on line 73 3 73
ControlStatementBraces This statement should have braces 3 163
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 282
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 283
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 286
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 311
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 314
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 378
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 398
ConfusingTernary Avoid if (x != y) ..; else ..; 3 426
ConfusingTernary Avoid if (x != y) ..; else ..; 3 427
ConfusingTernary Avoid if (x != y) ..; else ..; 3 430
ShortVariable Avoid variables with short names like i 3 475
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 505
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 510
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 513
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 549
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 554
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 558
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 561

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

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

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

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

Rule Violation Priority Ligne
UnusedPrivateField Avoid unused private fields such as '_plugin'. 3 53

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

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

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

Rule Violation Priority Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strNotificationContent' 2 298

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 34637
TooManyMethods This class has too many methods, consider refactoring it. 3 76637
DefaultPackage Use explicit scoping instead of the default package private level 3 108
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _mapper field if you want a default access modifier 3 108
NPathComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has an NPath complexity of 2080 3 185272
CyclomaticComplexity The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 13. 3 185272
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 311339
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 333
ShortVariable Avoid variables with short names like id 3 345
ShortVariable Avoid variables with short names like id 3 397
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 406
ConfusingTernary Avoid if (x != y) ..; else ..; 3 484
ConfusingTernary Avoid if (x != y) ..; else ..; 3 597
ConfusingTernary Avoid if (x != y) ..; else ..; 3 629

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

Rule Violation Priority Ligne
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 85
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 100
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 125
ConfusingTernary Avoid if (x != y) ..; else ..; 3 141151
ConfusingTernary Avoid if (x != y) ..; else ..; 3 293
ConfusingTernary Avoid if (x != y) ..; else ..; 3 312
LinguisticNaming Linguistics Antipattern - The getter 'getFilterCriteriaClauses' should not return void linguistically 3 323357
ShortVariable Avoid variables with short names like i 3 368
MissingOverride The method 'deleteBeforeDate(long)' is missing an @Override annotation. 3 401411

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.file.IFileStoreServiceProvider' 4 40
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 4 42
UnusedPrivateField Avoid unused private fields such as '_plugin'. 3 56
ShortVariable Avoid variables with short names like id 3 96

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

Rule Violation Priority Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 3 73
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 188191

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'java.util.HashMap' 4 50
UnusedImports Avoid unused imports such as 'org.glassfish.jersey.http.ResponseStatus' 4 57
FieldNamingConventions The static field name 'bIsInitialized' doesn't match '_[a-z][a-zA-Z0-9]*' 1 89
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 3 89
ImmutableField Private field '_requestAuthor' could be made final; it is only initialized in the declaration or constructor. 3 93

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

Rule Violation Priority Ligne
MissingOverride The method 'findByCustomerId(String)' is missing an @Override annotation. 3 7789
MissingOverride The method 'findByReference(String)' is missing an @Override annotation. 3 98110
MissingOverride The method 'findByPrimaryKey(String, String)' is missing an @Override annotation. 3 121131
MissingOverride The method 'create(Demand)' is missing an @Override annotation. 3 140148
MissingOverride The method 'create(Notification)' is missing an @Override annotation. 3 157168
MissingOverride The method 'create(NotificationEvent)' is missing an @Override annotation. 3 176181
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notificationDao' 3 180
MissingOverride The method 'update(Demand)' is missing an @Override annotation. 3 190198
MissingOverride The method 'remove(String, String)' is missing an @Override annotation. 3 208220
MissingOverride The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. 3 232242
MissingOverride The method 'getDemandTypesList()' is missing an @Override annotation. 3 249253
ShortVariable Avoid variables with short names like id 3 260
MissingOverride The method 'getDemandType(int)' is missing an @Override annotation. 3 260264
MissingOverride The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. 3 272275

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 821

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
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 68612
GodClass Possible God Class (WMC=70, ATFD=70, TCC=9.167%) 3 68612
CommentRequired Header comments are required 3 68612
TooManyMethods This class has too many methods, consider refactoring it. 3 69612
NonThreadSafeSingleton Singleton is not thread safe 3 112117
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 162165
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 162
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 162
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 170
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 170173
GuardLogStatement Logger calls should be surrounded by log level guards. 2 240
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 241
GuardLogStatement Logger calls should be surrounded by log level guards. 2 278
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 287
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 287290
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 287
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 295
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 295298
CyclomaticComplexity The method 'store(Notification)' has a cyclomatic complexity of 14. 3 321382
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 471
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 478
ShortVariable Avoid variables with short names like ex 3 505
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 515
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 53 characters appended. 3 530
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 531
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 531
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 531
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 532
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 532
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 533
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 533
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 534
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 534
GuardLogStatement Logger calls should be surrounded by log level guards. 2 584
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'notification' 3 593

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

Rule Violation Priority Ligne
UncommentedEmptyMethodBody Document empty method body 3 5455

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

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

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.demand.DemandStatus' 4 45
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 57107

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
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 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 58194
NPathComplexity The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 5824 3 102173
CyclomaticComplexity The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 18. 3 102173
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 128131
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 138141
DefaultPackage Use explicit scoping instead of the default package private level 3 184193
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 185193

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

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

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.notificationstore.service.DemandService' 4 51
CommentRequired Header comments are required 3 59209
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 59209
CyclomaticComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. 3 101199
NPathComplexity The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 3 101199
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 201208
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 202208

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 59229
CyclomaticComplexity The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. 3 103191
NPathComplexity The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 3 103191
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 201
DefaultPackage Use explicit scoping instead of the default package private level 3 219227
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 220227

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 132
DefaultPackage Use explicit scoping instead of the default package private level 3 150157
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier 3 151157
ConfusingTernary Avoid if (x != y) ..; else ..; 3 177

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

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 134
ConfusingTernary Avoid if (x != y) ..; else ..; 3 147163
ShortVariable Avoid variables with short names like id 3 176
ShortVariable Avoid variables with short names like id 3 203

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 34248
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.notification.EnumNotificationType' 4 53
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.web.rs.NotificationResult' 4 58
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 9094
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 96
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 127132
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 134
ConfusingTernary Avoid if (x != y) ..; else ..; 3 171185
ConfusingTernary Avoid if (x != y) ..; else ..; 3 229240

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.identitystore.v3.web.rs.util.Constants' 4 53
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 114118
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 170175
ConfusingTernary Avoid if (x != y) ..; else ..; 3 186213

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.web.rs.responseStatus.ResponseStatus' 4 53
CommentRequired Header comments are required 3 62147

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

Rule Violation Priority Ligne
MissingStaticMethodInNonInstantiatableClass Class cannot be instantiated and does not provide any static methods or fields 3 71237
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 71237