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/grusupply/business/StatusMessage.java

Rule Violation Ligne
FormalParameterNamingConventions The method parameter name '_strStatus' doesn't match '[a-z][a-zA-Z0-9]*' 28
FormalParameterNamingConventions The method parameter name '_strMessage' doesn't match '[a-z][a-zA-Z0-9]*' 28
FormalParameterNamingConventions The method parameter name '_strType' doesn't match '[a-z][a-zA-Z0-9]*' 28
FormalParameterNamingConventions The method parameter name '_strReason' doesn't match '[a-z][a-zA-Z0-9]*' 28
FormalParameterNamingConventions The method parameter name '_strType' doesn't match '[a-z][a-zA-Z0-9]*' 53
FormalParameterNamingConventions The method parameter name '_strStatus' doesn't match '[a-z][a-zA-Z0-9]*' 73
FormalParameterNamingConventions The method parameter name '_strReason' doesn't match '[a-z][a-zA-Z0-9]*' 93
FormalParameterNamingConventions The method parameter name '_strMessage' doesn't match '[a-z][a-zA-Z0-9]*' 113

fr/paris/lutece/plugins/grusupply/constant/GruSupplyConstants.java

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

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

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

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

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

fr/paris/lutece/plugins/grusupply/utils/GrusupplyUtils.java

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

Priority 2

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

Rule Violation Ligne
AvoidReassigningParameters Avoid reassigning parameters such as 'strGuid' 144

fr/paris/lutece/plugins/grusupply/web/rs/GRUSupplyRestService.java

Rule Violation Ligne
GuardLogStatement Logger calls should be surrounded by log level guards. 131
GuardLogStatement Logger calls should be surrounded by log level guards. 150
GuardLogStatement Logger calls should be surrounded by log level guards. 349

Priority 3

fr/paris/lutece/plugins/grusupply/constant/GruSupplyConstants.java

Rule Violation Ligne
CommentRequired Header comments are required 3670

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

Rule Violation Ligne
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 82

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

Rule Violation Ligne
CommentRequired Header comments are required 4799
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. 4899
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 51

fr/paris/lutece/plugins/grusupply/service/notifyers/NotifyCrmService.java

Rule Violation Ligne
CommentRequired Header comments are required 62313
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 7577
UncommentedEmptyConstructor Document empty constructor 7577
ConfusingTernary Avoid if (x != y) ..; else ..; 157164
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 223
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 223
CyclomaticComplexity The method 'buildCrmItemForDemand(Notification, CRMItemTypeEnum)' has a cyclomatic complexity of 14. 247275
NPathComplexity The method 'buildCrmItemForDemand(Notification, CRMItemTypeEnum)' has an NPath complexity of 972 247275
ConfusingTernary Avoid if (x != y) ..; else ..; 262263
CyclomaticComplexity The method 'buildCrmItemForNotification(Notification, CRMItemTypeEnum)' has a cyclomatic complexity of 11. 286307
NPathComplexity The method 'buildCrmItemForNotification(Notification, CRMItemTypeEnum)' has an NPath complexity of 243 286307

fr/paris/lutece/plugins/grusupply/service/notifyers/SendEmailService.java

Rule Violation Ligne
CommentRequired Header comments are required 46165
UncommentedEmptyConstructor Document empty constructor 5355
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the SendEmailService constructor if you want a default access modifier 5355

fr/paris/lutece/plugins/grusupply/service/notifyers/SendSmsService.java

Rule Violation Ligne
CommentRequired Header comments are required 4369
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the SendSmsService constructor if you want a default access modifier 4648
UncommentedEmptyConstructor Document empty constructor 4648
MissingOverride The method 'process(Notification)' is missing an @Override annotation. 5563

fr/paris/lutece/plugins/grusupply/service/notifyers/SendStatisticsService.java

Rule Violation Ligne
CommentRequired Header comments are required 52115
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 5759
UncommentedEmptyConstructor Document empty constructor 5759
MissingOverride The method 'process(Notification)' is missing an @Override annotation. 6772
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 90
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 90
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 91
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 91
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 102

fr/paris/lutece/plugins/grusupply/web/rs/DemandNotificationRestService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34289
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 9194
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 96
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 97
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 122126
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 128
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 129
ConfusingTernary Avoid if (x != y) ..; else ..; 204219
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 214217

fr/paris/lutece/plugins/grusupply/web/rs/GRUSupplyRestService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34544
CommentRequired Header comments are required 78544
NPathComplexity The method 'notification(String)' has an NPath complexity of 536 118241
CyclomaticComplexity The method 'notification(String)' has a cyclomatic complexity of 17. 118241
ExcessiveMethodLength Avoid really long methods. 118241
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 151
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 219
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 219222
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 219
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 227
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 227230
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 53 characters appended. 317
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 318
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 318
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 318
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 319
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 319
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 320
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 320
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 321
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 321
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 358
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 358
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 358361
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 366369
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 366
ShortVariable Avoid variables with short names like ex 487
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 497
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 521
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 528

Priority 4

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

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.crmclient.util.CRMException' 36

fr/paris/lutece/plugins/grusupply/service/notifyers/NotifyCrmService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'com.fasterxml.jackson.databind.JsonMappingException' 52

Fichiers

fr/paris/lutece/plugins/grusupply/business/StatusMessage.java

Rule Violation Priority Ligne
FormalParameterNamingConventions The method parameter name '_strStatus' doesn't match '[a-z][a-zA-Z0-9]*' 1 28
FormalParameterNamingConventions The method parameter name '_strMessage' doesn't match '[a-z][a-zA-Z0-9]*' 1 28
FormalParameterNamingConventions The method parameter name '_strType' doesn't match '[a-z][a-zA-Z0-9]*' 1 28
FormalParameterNamingConventions The method parameter name '_strReason' doesn't match '[a-z][a-zA-Z0-9]*' 1 28
FormalParameterNamingConventions The method parameter name '_strType' doesn't match '[a-z][a-zA-Z0-9]*' 1 53
FormalParameterNamingConventions The method parameter name '_strStatus' doesn't match '[a-z][a-zA-Z0-9]*' 1 73
FormalParameterNamingConventions The method parameter name '_strReason' doesn't match '[a-z][a-zA-Z0-9]*' 1 93
FormalParameterNamingConventions The method parameter name '_strMessage' doesn't match '[a-z][a-zA-Z0-9]*' 1 113

fr/paris/lutece/plugins/grusupply/constant/GruSupplyConstants.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 3670
ClassNamingConventions The utility class name 'GruSupplyConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3670

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

Rule Violation Priority Ligne
FieldNamingConventions The static field name 'bIsInitialized' doesn't match '_[a-z][a-zA-Z0-9]*' 1 82
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 3 82
AvoidReassigningParameters Avoid reassigning parameters such as 'strGuid' 2 144

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

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.crmclient.util.CRMException' 4 36
CommentRequired Header comments are required 3 4799
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 4899
FieldNamingConventions The static field name 'bIsInitialized' doesn't match '_[a-z][a-zA-Z0-9]*' 1 51
RedundantFieldInitializer Avoid using redundant field initializer for 'bIsInitialized' 3 51

fr/paris/lutece/plugins/grusupply/service/notifyers/NotifyCrmService.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'com.fasterxml.jackson.databind.JsonMappingException' 4 52
CommentRequired Header comments are required 3 62313
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 7577
UncommentedEmptyConstructor Document empty constructor 3 7577
ConfusingTernary Avoid if (x != y) ..; else ..; 3 157164
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 223
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 223
CyclomaticComplexity The method 'buildCrmItemForDemand(Notification, CRMItemTypeEnum)' has a cyclomatic complexity of 14. 3 247275
NPathComplexity The method 'buildCrmItemForDemand(Notification, CRMItemTypeEnum)' has an NPath complexity of 972 3 247275
ConfusingTernary Avoid if (x != y) ..; else ..; 3 262263
CyclomaticComplexity The method 'buildCrmItemForNotification(Notification, CRMItemTypeEnum)' has a cyclomatic complexity of 11. 3 286307
NPathComplexity The method 'buildCrmItemForNotification(Notification, CRMItemTypeEnum)' has an NPath complexity of 243 3 286307

fr/paris/lutece/plugins/grusupply/service/notifyers/SendEmailService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 46165
UncommentedEmptyConstructor Document empty constructor 3 5355
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the SendEmailService constructor if you want a default access modifier 3 5355

fr/paris/lutece/plugins/grusupply/service/notifyers/SendSmsService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 4369
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the SendSmsService constructor if you want a default access modifier 3 4648
UncommentedEmptyConstructor Document empty constructor 3 4648
MissingOverride The method 'process(Notification)' is missing an @Override annotation. 3 5563

fr/paris/lutece/plugins/grusupply/service/notifyers/SendStatisticsService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 52115
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 5759
UncommentedEmptyConstructor Document empty constructor 3 5759
MissingOverride The method 'process(Notification)' is missing an @Override annotation. 3 6772
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 90
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 90
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 91
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 91
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 102

fr/paris/lutece/plugins/grusupply/utils/GrusupplyUtils.java

Rule Violation Priority Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 4989

fr/paris/lutece/plugins/grusupply/web/rs/DemandNotificationRestService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34289
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 9194
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 96
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 97
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 122126
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 128
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 129
ConfusingTernary Avoid if (x != y) ..; else ..; 3 204219
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 214217

fr/paris/lutece/plugins/grusupply/web/rs/GRUSupplyRestService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34544
CommentRequired Header comments are required 3 78544
NPathComplexity The method 'notification(String)' has an NPath complexity of 536 3 118241
CyclomaticComplexity The method 'notification(String)' has a cyclomatic complexity of 17. 3 118241
ExcessiveMethodLength Avoid really long methods. 3 118241
GuardLogStatement Logger calls should be surrounded by log level guards. 2 131
GuardLogStatement Logger calls should be surrounded by log level guards. 2 150
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 151
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 219
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 219222
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 219
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 227
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 227230
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 53 characters appended. 3 317
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 318
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 318
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 318
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 319
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 319
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 320
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 320
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 321
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 321
GuardLogStatement Logger calls should be surrounded by log level guards. 2 349
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 358
AvoidCatchingNPE Avoid catching NullPointerException; consider removing the cause of the NPE. 3 358
IdenticalCatchBranches 'catch' branch identical to 'JsonParseException' branch 3 358361
IdenticalCatchBranches 'catch' branch identical to 'IOException' branch 3 366369
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 366
ShortVariable Avoid variables with short names like ex 3 487
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 497
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 521
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 528