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 243–254

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

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

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

Violation Line
It is a good practice to call super() in a constructor 50–58
Overriding method merely calls super 102–105
Avoid variables with short names like o 102
Overriding method merely calls super 111–114

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

Violation Line
Use block level rather than method level synchronization 73–97

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

Violation Line
It is a good practice to call super() in a constructor 50–53

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 57–59
Document empty constructor 57–59
It is a good practice to call super() in a constructor 57–59
Singleton is not thread safe 81–84

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

Violation Line
Deeply nested if..then statements are hard to read 50–59

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

Violation Line
It is a good practice to call super() in a constructor 18–21

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. 168–199
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 189–192

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) 34–339
The class 'SessionPersistenceService' has a Cyclomatic Complexity of 4 (Highest = 17). 57–339
The method 'doesItemMatchFilter' has a Cyclomatic Complexity of 17. 231–249
Avoid unnecessary if..then..else statements when returning booleans 233–247

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() 56–59

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). 23–356
The class 'ShoppingCartValidatorService' has a Standard Cyclomatic Complexity of 5 (Highest = 13). 23–356
The class 'ShoppingCartValidatorService' has a Cyclomatic Complexity of 6 (Highest = 13). 23–356
Use of modifier volatile is not recommended. 29
Use block level rather than method level synchronization 67–118
The method 'modifyValidatorOrder' has a Cyclomatic Complexity of 11. 67–118
Use block level rather than method level synchronization 126–141
The method 'getNextValidator' has a Cyclomatic Complexity of 10. 151–186
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. 235–325
The method 'generateValidatorList' has a Modified Cyclomatic Complexity of 13. 235–325
The method 'generateValidatorList' has a Standard Cyclomatic Complexity of 13. 235–325
Use block level rather than method level synchronization 235–325
The method generateValidatorList() has an NPath complexity of 784 235–325
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). 75–547
The class 'ShoppingCartApp' has a Standard Cyclomatic Complexity of 4 (Highest = 14). 75–547
The class 'ShoppingCartApp' has a Cyclomatic Complexity of 4 (Highest = 16). 75–547
The method 'getValidateShoppingCart' has a Cyclomatic Complexity of 16. 254–363
The method 'getValidateShoppingCart' has a Standard Cyclomatic Complexity of 14. 254–363
The method 'getValidateShoppingCart' has a Modified Cyclomatic Complexity of 14. 254–363
Avoid really long methods. 254–363
The method getValidateShoppingCart() has an NPath complexity of 5112 254–363
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 282–286
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