Le document suivant contient les résultats de PMD 6.13.0.
Rule | Violation | Ligne |
---|---|---|
FieldNamingConventions | The static field name 'bIsInitialized' doesn't match '_[a-z][a-zA-Z0-9]*' | 89 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 68–612 |
Rule | Violation | Ligne |
---|---|---|
ClassNamingConventions | The utility class name 'NotificationStoreConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 36–102 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 71–237 |
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 |
Rule | Violation | Ligne |
---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'strNotificationContent' | 298 |
Rule | Violation | Ligne |
---|---|---|
SystemPrintln | System.out.println is used | 80 |
SystemPrintln | System.out.println is used | 100 |
SystemPrintln | System.out.println is used | 157 |
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 |
Rule | Violation | Ligne |
---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 197–200 |
Rule | Violation | Ligne |
---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 56–593 |
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 |
Rule | Violation | Ligne |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as '_plugin'. | 54 |
Rule | Violation | Ligne |
---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 203–206 |
Rule | Violation | Ligne |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as '_plugin'. | 53 |
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 |
Rule | Violation | Ligne |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–637 |
TooManyMethods | This class has too many methods, consider refactoring it. | 76–637 |
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 | 185–272 |
CyclomaticComplexity | The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 13. | 185–272 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 311–339 |
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 |
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 ..; | 141–151 |
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 | 323–357 |
ShortVariable | Avoid variables with short names like i | 368 |
MissingOverride | The method 'deleteBeforeDate(long)' is missing an @Override annotation. | 401–411 |
Rule | Violation | Ligne |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as '_plugin'. | 56 |
ShortVariable | Avoid variables with short names like id | 96 |
Rule | Violation | Ligne |
---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 73 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 188–191 |
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 |
Rule | Violation | Ligne |
---|---|---|
MissingOverride | The method 'findByCustomerId(String)' is missing an @Override annotation. | 77–89 |
MissingOverride | The method 'findByReference(String)' is missing an @Override annotation. | 98–110 |
MissingOverride | The method 'findByPrimaryKey(String, String)' is missing an @Override annotation. | 121–131 |
MissingOverride | The method 'create(Demand)' is missing an @Override annotation. | 140–148 |
MissingOverride | The method 'create(Notification)' is missing an @Override annotation. | 157–168 |
MissingOverride | The method 'create(NotificationEvent)' is missing an @Override annotation. | 176–181 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'notificationDao' | 180 |
MissingOverride | The method 'update(Demand)' is missing an @Override annotation. | 190–198 |
MissingOverride | The method 'remove(String, String)' is missing an @Override annotation. | 208–220 |
MissingOverride | The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. | 232–242 |
MissingOverride | The method 'getDemandTypesList()' is missing an @Override annotation. | 249–253 |
ShortVariable | Avoid variables with short names like id | 260 |
MissingOverride | The method 'getDemandType(int)' is missing an @Override annotation. | 260–264 |
MissingOverride | The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. | 272–275 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 8–21 |
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. | 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 |
Rule | Violation | Ligne |
---|---|---|
GodClass | Possible God Class (WMC=70, ATFD=70, TCC=9.167%) | 68–612 |
CommentRequired | Header comments are required | 68–612 |
TooManyMethods | This class has too many methods, consider refactoring it. | 69–612 |
NonThreadSafeSingleton | Singleton is not thread safe | 112–117 |
IdenticalCatchBranches | 'catch' branch identical to 'JsonParseException' branch | 162–165 |
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 | 170–173 |
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 | 287–290 |
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 | 295–298 |
CyclomaticComplexity | The method 'store(Notification)' has a cyclomatic complexity of 14. | 321–382 |
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 |
Rule | Violation | Ligne |
---|---|---|
UncommentedEmptyMethodBody | Document empty method body | 54–55 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 36–102 |
ShortVariable | Avoid variables with short names like ID | 53 |
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. | 57–107 |
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 |
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 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 58–194 |
NPathComplexity | The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 5824 | 102–173 |
CyclomaticComplexity | The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 18. | 102–173 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 128–131 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 138–141 |
DefaultPackage | Use explicit scoping instead of the default package private level | 184–193 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 185–193 |
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 | 146–154 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 147–154 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 174 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 59–209 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 59–209 |
CyclomaticComplexity | The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. | 101–199 |
NPathComplexity | The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 | 101–199 |
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 | 201–208 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 202–208 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 59–229 |
CyclomaticComplexity | The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. | 103–191 |
NPathComplexity | The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 | 103–191 |
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 | 201 |
DefaultPackage | Use explicit scoping instead of the default package private level | 219–227 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 220–227 |
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 | 150–157 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 151–157 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 177 |
Rule | Violation | Ligne |
---|---|---|
ShortVariable | Avoid variables with short names like id | 134 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 147–163 |
ShortVariable | Avoid variables with short names like id | 176 |
ShortVariable | Avoid variables with short names like id | 203 |
Rule | Violation | Ligne |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–248 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 90–94 |
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. | 127–132 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 134 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 171–185 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 229–240 |
Rule | Violation | Ligne |
---|---|---|
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 114–118 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 170–175 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 186–213 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 62–147 |
Rule | Violation | Ligne |
---|---|---|
MissingStaticMethodInNonInstantiatableClass | Class cannot be instantiated and does not provide any static methods or fields | 71–237 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' | 41 |
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 |
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 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.demand.DemandStatus' | 45 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.notificationstore.service.DemandService' | 51 |
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 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.identitystore.v3.web.rs.util.Constants' | 53 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.plugins.grubusiness.business.web.rs.responseStatus.ResponseStatus' | 53 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 197–200 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 56–593 |
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 |
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 203–206 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnusedPrivateField | Avoid unused private fields such as '_plugin'. | 3 | 53 |
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
AvoidReassigningParameters | Avoid reassigning parameters such as 'strNotificationContent' | 2 | 298 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–637 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 76–637 |
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 | 185–272 |
CyclomaticComplexity | The method 'getFilterCriteriaClauses(String, NotificationFilter)' has a cyclomatic complexity of 13. | 3 | 185–272 |
AvoidSynchronizedAtMethodLevel | Use block level rather than method level synchronization | 3 | 311–339 |
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 |
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 | 141–151 |
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 | 323–357 |
ShortVariable | Avoid variables with short names like i | 3 | 368 |
MissingOverride | The method 'deleteBeforeDate(long)' is missing an @Override annotation. | 3 | 401–411 |
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 73 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 188–191 |
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingOverride | The method 'findByCustomerId(String)' is missing an @Override annotation. | 3 | 77–89 |
MissingOverride | The method 'findByReference(String)' is missing an @Override annotation. | 3 | 98–110 |
MissingOverride | The method 'findByPrimaryKey(String, String)' is missing an @Override annotation. | 3 | 121–131 |
MissingOverride | The method 'create(Demand)' is missing an @Override annotation. | 3 | 140–148 |
MissingOverride | The method 'create(Notification)' is missing an @Override annotation. | 3 | 157–168 |
MissingOverride | The method 'create(NotificationEvent)' is missing an @Override annotation. | 3 | 176–181 |
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 | 190–198 |
MissingOverride | The method 'remove(String, String)' is missing an @Override annotation. | 3 | 208–220 |
MissingOverride | The method 'findEventsByDateAndDemandTypeIdAndStatus(long, long, String, String)' is missing an @Override annotation. | 3 | 232–242 |
MissingOverride | The method 'getDemandTypesList()' is missing an @Override annotation. | 3 | 249–253 |
ShortVariable | Avoid variables with short names like id | 3 | 260 |
MissingOverride | The method 'getDemandType(int)' is missing an @Override annotation. | 3 | 260–264 |
MissingOverride | The method 'getIdsByCustomerIdAndDemandTypeId(String, String, String)' is missing an @Override annotation. | 3 | 272–275 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 8–21 |
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 | 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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 68–612 |
GodClass | Possible God Class (WMC=70, ATFD=70, TCC=9.167%) | 3 | 68–612 |
CommentRequired | Header comments are required | 3 | 68–612 |
TooManyMethods | This class has too many methods, consider refactoring it. | 3 | 69–612 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 112–117 |
IdenticalCatchBranches | 'catch' branch identical to 'JsonParseException' branch | 3 | 162–165 |
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 | 170–173 |
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 | 287–290 |
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 | 295–298 |
CyclomaticComplexity | The method 'store(Notification)' has a cyclomatic complexity of 14. | 3 | 321–382 |
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UncommentedEmptyMethodBody | Document empty method body | 3 | 54–55 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 36–102 |
ClassNamingConventions | The utility class name 'NotificationStoreConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 36–102 |
ShortVariable | Avoid variables with short names like ID | 3 | 53 |
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 | 57–107 |
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 |
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 58–194 |
NPathComplexity | The method 'getManageDemand(HttpServletRequest)' has an NPath complexity of 5824 | 3 | 102–173 |
CyclomaticComplexity | The method 'getManageDemand(HttpServletRequest)' has a cyclomatic complexity of 18. | 3 | 102–173 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 128–131 |
AvoidDeeplyNestedIfStmts | Deeply nested if..then statements are hard to read | 3 | 138–141 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 184–193 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 185–193 |
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 | 146–154 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 147–154 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 174 |
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 | 59–209 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 59–209 |
CyclomaticComplexity | The method 'getManageNotificationEvent(HttpServletRequest)' has a cyclomatic complexity of 25. | 3 | 101–199 |
NPathComplexity | The method 'getManageNotificationEvent(HttpServletRequest)' has an NPath complexity of 46144 | 3 | 101–199 |
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 | 201–208 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 202–208 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 59–229 |
CyclomaticComplexity | The method 'getManageNotification(HttpServletRequest)' has a cyclomatic complexity of 22. | 3 | 103–191 |
NPathComplexity | The method 'getManageNotification(HttpServletRequest)' has an NPath complexity of 18496 | 3 | 103–191 |
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 | 201 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 219–227 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 220–227 |
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 | 150–157 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the getItemsFromIds method if you want a default access modifier | 3 | 151–157 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 177 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ShortVariable | Avoid variables with short names like id | 3 | 134 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 147–163 |
ShortVariable | Avoid variables with short names like id | 3 | 176 |
ShortVariable | Avoid variables with short names like id | 3 | 203 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–248 |
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 | 90–94 |
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 | 127–132 |
PrematureDeclaration | Avoid declaring a variable if it is unreferenced before a possible exit point. | 3 | 134 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 171–185 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 229–240 |
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 | 114–118 |
UseObjectForClearerAPI | Rather than using a lot of String arguments, consider using a container object for those values. | 3 | 170–175 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 186–213 |
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 | 62–147 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingStaticMethodInNonInstantiatableClass | Class cannot be instantiated and does not provide any static methods or fields | 3 | 71–237 |
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 71–237 |