Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

fr/paris/lutece/plugins/shoppingcart/business/ShoppingCartItem.java

Violation Line
Avoid variables with short names like o 220
The method hashCode() has an NPath complexity of 15625 243254

fr/paris/lutece/plugins/shoppingcart/business/ShoppingCartItemDAO.java

Violation Line
The class 'ShoppingCartItemDAO' has a Modified Cyclomatic Complexity of 5 (Highest = 25). 50329
The class 'ShoppingCartItemDAO' has a Standard Cyclomatic Complexity of 5 (Highest = 25). 50329
The class 'ShoppingCartItemDAO' has a Cyclomatic Complexity of 5 (Highest = 25). 50329
The method 'findByFilter' has a Modified Cyclomatic Complexity of 25. 216327
The method 'findByFilter' has a Cyclomatic Complexity of 25. 216327
The method findByFilter() has an NPath complexity of 286654464 216327
The method 'findByFilter' has a Standard Cyclomatic Complexity of 25. 216327
Avoid really long methods. 216327

fr/paris/lutece/plugins/shoppingcart/business/ShoppingCartItemDTO.java

Violation Line
It is a good practice to call super() in a constructor 5058
Overriding method merely calls super 102105
Avoid variables with short names like o 102
Overriding method merely calls super 111114

fr/paris/lutece/plugins/shoppingcart/business/lot/ShoppingCartLotDAO.java

Violation Line
Use block level rather than method level synchronization 7397

fr/paris/lutece/plugins/shoppingcart/business/portlet/ShoppingCartPortlet.java

Violation Line
It is a good practice to call super() in a constructor 5053

fr/paris/lutece/plugins/shoppingcart/business/portlet/ShoppingCartPortletDAO.java

Violation Line
Avoid variables with short names like p 63
Avoid variables with short names like p 91

fr/paris/lutece/plugins/shoppingcart/business/portlet/ShoppingCartPortletHome.java

Violation Line
Use of modifier volatile is not recommended. 52
Avoid unnecessary constructors - the compiler will generate these for you 5759
Document empty constructor 5759
It is a good practice to call super() in a constructor 5759
Singleton is not thread safe 8184

fr/paris/lutece/plugins/shoppingcart/service/AnonymousShoppingCartFilter.java

Violation Line
Deeply nested if..then statements are hard to read 5059

fr/paris/lutece/plugins/shoppingcart/service/ShoppingCartCacheService.java

Violation Line
It is a good practice to call super() in a constructor 1821

fr/paris/lutece/plugins/shoppingcart/service/ShoppingCartService.java

Violation Line
Avoid protected methods in a final class that doesnt extend anything other than Object. Change to private or package access. 168199
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 177
Deeply nested if..then statements are hard to read 189192

fr/paris/lutece/plugins/shoppingcart/service/daemon/ShoppingCartCleanerDaemon.java

Violation Line
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 91

fr/paris/lutece/plugins/shoppingcart/service/persistence/SessionPersistenceService.java

Violation Line
Possible God class (WMC=48, ATFD=38, TCC=0.02564102564102564) 34339
The class 'SessionPersistenceService' has a Cyclomatic Complexity of 4 (Highest = 17). 57339
The method 'doesItemMatchFilter' has a Cyclomatic Complexity of 17. 231249
Avoid unnecessary if..then..else statements when returning booleans 233247

fr/paris/lutece/plugins/shoppingcart/service/persistence/SessionedShoppingCartItem.java

Violation Line
Private field '_listItems' could be made final; it is only initialized in the declaration or constructor. 56
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 107

fr/paris/lutece/plugins/shoppingcart/service/validator/AbstractShoppingCartValidator.java

Violation Line
A getX() method which returns a boolean should be named isX() 5659

fr/paris/lutece/plugins/shoppingcart/service/validator/IShoppingCartValidator.java

Violation Line
A getX() method which returns a boolean should be named isX() 98

fr/paris/lutece/plugins/shoppingcart/service/validator/ShoppingCartValidatorService.java

Violation Line
The class 'ShoppingCartValidatorService' has a Modified Cyclomatic Complexity of 5 (Highest = 13). 23356
The class 'ShoppingCartValidatorService' has a Standard Cyclomatic Complexity of 5 (Highest = 13). 23356
The class 'ShoppingCartValidatorService' has a Cyclomatic Complexity of 6 (Highest = 13). 23356
Use of modifier volatile is not recommended. 29
Use block level rather than method level synchronization 67118
The method 'modifyValidatorOrder' has a Cyclomatic Complexity of 11. 67118
Use block level rather than method level synchronization 126141
The method 'getNextValidator' has a Cyclomatic Complexity of 10. 151186
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 154
The method 'generateValidatorList' has a Cyclomatic Complexity of 13. 235325
The method 'generateValidatorList' has a Modified Cyclomatic Complexity of 13. 235325
The method 'generateValidatorList' has a Standard Cyclomatic Complexity of 13. 235325
Use block level rather than method level synchronization 235325
The method generateValidatorList() has an NPath complexity of 784 235325
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 240
Private field '_mapOrder' could be made final; it is only initialized in the declaration or constructor. 336
Avoid variables with short names like o1 351
Avoid variables with short names like o2 351

fr/paris/lutece/plugins/shoppingcart/web/ManageShoppingCartJspBean.java

Violation Line
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 112

fr/paris/lutece/plugins/shoppingcart/web/ShoppingCartApp.java

Violation Line
The class 'ShoppingCartApp' has a Modified Cyclomatic Complexity of 4 (Highest = 14). 75547
The class 'ShoppingCartApp' has a Standard Cyclomatic Complexity of 4 (Highest = 14). 75547
The class 'ShoppingCartApp' has a Cyclomatic Complexity of 4 (Highest = 16). 75547
The method 'getValidateShoppingCart' has a Cyclomatic Complexity of 16. 254363
The method 'getValidateShoppingCart' has a Standard Cyclomatic Complexity of 14. 254363
The method 'getValidateShoppingCart' has a Modified Cyclomatic Complexity of 14. 254363
Avoid really long methods. 254363
The method getValidateShoppingCart() has an NPath complexity of 5112 254363
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 265
Deeply nested if..then statements are hard to read 282286
Avoid using Literals in Conditional Statements 325
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 345
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 356
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 389
Avoid using Literals in Conditional Statements 470
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 476

fr/paris/lutece/plugins/shoppingcart/web/portlet/ShoppingCartPortletJspBean.java

Violation Line
Avoid declaring a variable if it is unreferenced before a possible exit point. 99