Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

fr/paris/lutece/plugins/dbpage/business/DbPage.java

Violation Line
Singleton is not thread safe 7175

fr/paris/lutece/plugins/dbpage/business/DbPageDAO.java

Violation Line
Ensure that resources like this Connection object are closed after use 64
Ensure that resources like this ResultSet object are closed after use 73
Assigning an Object to null is a code smell. Consider refactoring. 101
A throw statement in a finally block makes the control flow hard to understand. 105120
New exception is thrown in catch block, original stack trace may be lost 116

fr/paris/lutece/plugins/dbpage/business/DbPageDatabaseSection.java

Violation Line
Singleton is not thread safe 6670

fr/paris/lutece/plugins/dbpage/business/DbPageDatabaseSectionDAO.java

Violation Line
Avoid using if statements without curly braces 337

fr/paris/lutece/plugins/dbpage/business/DbPageDatabaseSectionRoleRemovalListener.java

Violation Line
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 67
Avoid unnecessary if..then..else statements when returning booleans 6770

fr/paris/lutece/plugins/dbpage/business/DbPageLoaderDatabase.java

Violation Line
Private field '_strPluginName' could be made final; it is only initialized in the declaration or constructor. 54
Position literals first in String comparisons 149
String.indexOf(char) is faster than String.indexOf(String). 151

fr/paris/lutece/plugins/dbpage/business/DbPageLoaderProperties.java

Violation Line
Private field '_strDbPageFilesPath' could be made final; it is only initialized in the declaration or constructor. 76
Avoid variables with short names like is 149
Position literals first in String comparisons 231
String.indexOf(char) is faster than String.indexOf(String). 233

fr/paris/lutece/plugins/dbpage/business/portlet/DbPagePortlet.java

Violation Line
It is a good practice to call super() in a constructor 6265
Avoid variables with short names like st 118

fr/paris/lutece/plugins/dbpage/business/portlet/DbPagePortletDAO.java

Violation Line
Avoid variables with short names like p 78
Avoid variables with short names like p 120

fr/paris/lutece/plugins/dbpage/business/portlet/DbPagePortletHome.java

Violation Line
Possible unsafe assignment to a non-final static field in a constructor. 52
It is a good practice to call super() in a constructor 5763
Singleton is not thread safe 7275

fr/paris/lutece/plugins/dbpage/business/section/DbPageSection.java

Violation Line
Abstract classes should be named AbstractXXX 47298

fr/paris/lutece/plugins/dbpage/business/section/DbPageSectionForm.java

Violation Line
Avoid unused imports such as 'java.util.Collection' 44
Avoid unused imports such as 'java.util.Collection' 44
Avoid unused imports such as 'java.util.Iterator' 46
Avoid unused imports such as 'java.util.Iterator' 46
It is a good practice to call super() in a constructor 7175
Assigning an Object to null is a code smell. Consider refactoring. 100
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 202

fr/paris/lutece/plugins/dbpage/business/section/DbPageSectionSelect.java

Violation Line
It is a good practice to call super() in a constructor 7377
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 169

fr/paris/lutece/plugins/dbpage/business/section/DbPageSectionTable.java

Violation Line
It is a good practice to call super() in a constructor 7074
Assigning an Object to null is a code smell. Consider refactoring. 101
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 185

fr/paris/lutece/plugins/dbpage/service/DbPageConnectionService.java

Violation Line
Avoid using implementation types like 'Hashtable'; use the interface instead 49
Consider replacing this Hashtable with the newer java.util.Map 49
Avoid using implementation types like 'Hashtable'; use the interface instead 49

fr/paris/lutece/plugins/dbpage/service/DbPageContextService.java

Violation Line
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 61
Assigning an Object to null is a code smell. Consider refactoring. 92
Prefer StringBuffer over += for concatenating strings 112
Deeply nested if..then statements are hard to read 135139
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 148

fr/paris/lutece/plugins/dbpage/service/DbPageService.java

Violation Line
Avoid variables with short names like i 148

fr/paris/lutece/plugins/dbpage/web/DbPageJspBean.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34987
The class 'DbPageJspBean' has a Standard Cyclomatic Complexity of 3 (Highest = 10). 83987
The class 'DbPageJspBean' has a Cyclomatic Complexity of 4 (Highest = 15). 83987
The class 'DbPageJspBean' has a Modified Cyclomatic Complexity of 3 (Highest = 10). 83987
Document empty constructor 172174
It is a good practice to call super() in a constructor 172174
Avoid unnecessary constructors - the compiler will generate these for you 172174
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 193
Do not add empty strings 195
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 213
Avoid declaring a variable if it is unreferenced before a possible exit point. 213
Avoid declaring a variable if it is unreferenced before a possible exit point. 214
Avoid declaring a variable if it is unreferenced before a possible exit point. 215
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 220
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 257
Avoid declaring a variable if it is unreferenced before a possible exit point. 279
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 279
The method 'doCreateSection' has a Standard Cyclomatic Complexity of 10. 350454
Avoid really long methods. 350454
The method 'doCreateSection' has a Modified Cyclomatic Complexity of 10. 350454
The method 'doCreateSection' has a Cyclomatic Complexity of 12. 350454
The method doCreateSection() has an NPath complexity of 384 350454
Avoid declaring a variable if it is unreferenced before a possible exit point. 352
Avoid declaring a variable if it is unreferenced before a possible exit point. 356
Position literals first in String comparisons 378
The method 'doModifySection' has a Modified Cyclomatic Complexity of 10. 462562
The method 'doModifySection' has a Cyclomatic Complexity of 15. 462562
Avoid really long methods. 462562
The method 'doModifySection' has a Standard Cyclomatic Complexity of 10. 462562
The method doModifySection() has an NPath complexity of 1297 462562
Avoid declaring a variable if it is unreferenced before a possible exit point. 472
Avoid declaring a variable if it is unreferenced before a possible exit point. 473
Avoid declaring a variable if it is unreferenced before a possible exit point. 474
Avoid declaring a variable if it is unreferenced before a possible exit point. 476
Position literals first in String comparisons for EqualsIgnoreCase 478
Avoid declaring a variable if it is unreferenced before a possible exit point. 500
Avoid declaring a variable if it is unreferenced before a possible exit point. 502
Avoid declaring a variable if it is unreferenced before a possible exit point. 510
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 556
Avoid declaring a variable if it is unreferenced before a possible exit point. 589
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 693
Prefer StringBuffer over += for concatenating strings 742
Prefer StringBuffer over += for concatenating strings 742
Avoid declaring a variable if it is unreferenced before a possible exit point. 796
Avoid using equals() to compare against null 833
Avoid using Literals in Conditional Statements 881

fr/paris/lutece/plugins/dbpage/web/DbpageApp.java

Violation Line
Avoid unused private fields such as 'STR_PARAMETER_ERROR'. 69

fr/paris/lutece/plugins/dbpage/web/portlet/DbPagePortletJspBean.java

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