Le document suivant contient les résultats de PMD 5.3.5.
Violation | Ligne |
---|---|
Singleton is not thread safe | 71–75 |
Violation | Ligne |
---|---|
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. | 105–120 |
New exception is thrown in catch block, original stack trace may be lost | 116 |
Violation | Ligne |
---|---|
Singleton is not thread safe | 66–70 |
Violation | Ligne |
---|---|
Avoid using if statements without curly braces | 337 |
Violation | Ligne |
---|---|
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 | 67–70 |
Violation | Ligne |
---|---|
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 |
Violation | Ligne |
---|---|
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 |
Violation | Ligne |
---|---|
It is a good practice to call super() in a constructor | 62–65 |
Avoid variables with short names like st | 118 |
Violation | Ligne |
---|---|
Avoid variables with short names like p | 78 |
Avoid variables with short names like p | 120 |
Violation | Ligne |
---|---|
Possible unsafe assignment to a non-final static field in a constructor. | 52 |
It is a good practice to call super() in a constructor | 57–63 |
Singleton is not thread safe | 72–75 |
Violation | Ligne |
---|---|
Abstract classes should be named AbstractXXX | 47–298 |
Violation | Ligne |
---|---|
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 | 71–75 |
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 |
Violation | Ligne |
---|---|
It is a good practice to call super() in a constructor | 73–77 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 169 |
Violation | Ligne |
---|---|
It is a good practice to call super() in a constructor | 70–74 |
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 |
Violation | Ligne |
---|---|
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 |
Violation | Ligne |
---|---|
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 | 135–139 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 148 |
Violation | Ligne |
---|---|
Avoid variables with short names like i | 148 |
Violation | Ligne |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 34–987 |
The class 'DbPageJspBean' has a Standard Cyclomatic Complexity of 3 (Highest = 10). | 83–987 |
The class 'DbPageJspBean' has a Cyclomatic Complexity of 4 (Highest = 15). | 83–987 |
The class 'DbPageJspBean' has a Modified Cyclomatic Complexity of 3 (Highest = 10). | 83–987 |
Document empty constructor | 172–174 |
It is a good practice to call super() in a constructor | 172–174 |
Avoid unnecessary constructors - the compiler will generate these for you | 172–174 |
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. | 350–454 |
Avoid really long methods. | 350–454 |
The method 'doCreateSection' has a Modified Cyclomatic Complexity of 10. | 350–454 |
The method 'doCreateSection' has a Cyclomatic Complexity of 12. | 350–454 |
The method doCreateSection() has an NPath complexity of 384 | 350–454 |
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. | 462–562 |
The method 'doModifySection' has a Cyclomatic Complexity of 15. | 462–562 |
Avoid really long methods. | 462–562 |
The method 'doModifySection' has a Standard Cyclomatic Complexity of 10. | 462–562 |
The method doModifySection() has an NPath complexity of 1297 | 462–562 |
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 |
Violation | Ligne |
---|---|
Avoid unused private fields such as 'STR_PARAMETER_ERROR'. | 69 |
Violation | Ligne |
---|---|
Avoid declaring a variable if it is unreferenced before a possible exit point. | 146 |