Le document suivant contient les résultats de PMD 5.5.1.
Violation | Ligne |
---|---|
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. | 8–92 |
Violation | Ligne |
---|---|
Avoid variables with short names like id | 65 |
Violation | Ligne |
---|---|
Avoid variables with short names like o | 8 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'java.util.Collection' | 38 |
Avoid unused imports such as 'java.util.Collection' | 38 |
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. | 47–80 |
Violation | Ligne |
---|---|
Possible God class (WMC=55, ATFD=61, TCC=0.01818181818181818) | 1–422 |
The class 'BuildJsonBodyService' has a Modified Cyclomatic Complexity of 4 (Highest = 14). | 35–422 |
The class 'BuildJsonBodyService' has a Cyclomatic Complexity of 5 (Highest = 17). | 35–422 |
The class 'BuildJsonBodyService' has a Standard Cyclomatic Complexity of 4 (Highest = 14). | 35–422 |
Avoid unused private fields such as 'PROPERTY_ENTRY_TYPE_IMAGE'. | 39 |
Singleton is not thread safe | 55–60 |
The method getRecordFieldValue() has an NPath complexity of 1264 | 91–180 |
The method 'getRecordFieldValue' has a Standard Cyclomatic Complexity of 14. | 91–180 |
The method 'getRecordFieldValue' has a Cyclomatic Complexity of 17. | 91–180 |
The method 'getRecordFieldValue' has a Modified Cyclomatic Complexity of 14. | 91–180 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 93 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 94 |
Avoid using Literals in Conditional Statements | 121 |
Avoid using Literals in Conditional Statements | 131 |
Avoid using Literals in Conditional Statements | 142 |
When instantiating a SimpleDateFormat object, specify a Locale | 155 |
Avoid using if statements without curly braces | 157–158 |
Avoid empty catch blocks | 161–164 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 161 |
Avoid using Literals in Conditional Statements | 206 |
Avoid unused private methods such as 'getDateCreation(int,int)'. | 235 |
When instantiating a SimpleDateFormat object, specify a Locale | 262 |
Avoid using if statements without curly braces | 264–265 |
When instantiating a SimpleDateFormat object, specify a Locale | 280 |
Avoid using if statements without curly braces | 282–283 |
Do not add empty strings | 298 |
The String literal "DescId" appears 4 times in this file; the first occurrence is on line 302 | 302 |
The String literal "Value" appears 5 times in this file; the first occurrence is on line 304 | 304 |
Avoid using if...else statements without curly braces | 304 |
Avoid using if...else statements without curly braces | 306 |
Do not add empty strings | 326 |
Avoid using if...else statements without curly braces | 333 |
Avoid using if...else statements without curly braces | 335 |
Do not add empty strings | 349 |
Do not add empty strings | 368 |
Violation | Ligne |
---|---|
Possible unsafe assignment to a non-final static field in a constructor. | 15 |
Possible unsafe assignment to a non-final static field in a constructor. | 16 |
Singleton is not thread safe | 30–35 |
The String literal "x-auth" appears 9 times in this file; the first occurrence is on line 74 | 74 |
Rather than using a lot of String arguments, consider using a container object for those values. | 88 |
Violation | Ligne |
---|---|
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. | 45–62 |
Violation | Ligne |
---|---|
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. | 46–85 |
Singleton is not thread safe | 57–60 |
Violation | Ligne |
---|---|
Perhaps '_acdpThread' could be replaced by a local variable. | 24 |
Assigning an Object to null is a code smell. Consider refactoring. | 65 |
Use one line for each declaration, it enhances code readability. | 103 |
Violation | Ligne |
---|---|
Avoid modifiers which are implied by the context | 61 |
Avoid modifiers which are implied by the context | 69 |
Avoid modifiers which are implied by the context | 77 |
Avoid modifiers which are implied by the context | 84 |
Avoid modifiers which are implied by the context | 92 |
Violation | Ligne |
---|---|
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 107 |
Avoid throwing raw exception types. | 110 |
Violation | Ligne |
---|---|
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 66 |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 87 |
Violation | Ligne |
---|---|
Package name contains upper case characters | 1 |
Possible God class (WMC=60, ATFD=53, TCC=0.2087912087912088) | 1–490 |
Private field '_client' could be made final; it is only initialized in the declaration or constructor. | 35 |
Private field '_eudonetRestWsService' could be made final; it is only initialized in the declaration or constructor. | 36 |
Private field '_listEuData' could be made final; it is only initialized in the declaration or constructor. | 37 |
Private field '_nIdResource' could be made final; it is only initialized in the declaration or constructor. | 38 |
Private field '_nIdDirectory' could be made final; it is only initialized in the declaration or constructor. | 39 |
Private field '_nIdAction' could be made final; it is only initialized in the declaration or constructor. | 40 |
Use explicit scoping instead of the default package private level | 44 |
Avoid using redundant field initializer for 'bError' | 46 |
Use explicit scoping instead of the default package private level | 46 |
Use explicit scoping instead of the default package private level | 47 |
Avoid using redundant field initializer for 'resourceDTO' | 47 |
Avoid using redundant field initializer for 'error' | 48 |
Use explicit scoping instead of the default package private level | 48 |
It is a good practice to call super() in a constructor | 59–68 |
Assigning an Object to null is a code smell. Consider refactoring. | 85 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 111 |
Avoid using Literals in Conditional Statements | 154 |
The String literal "object" appears 24 times in this file; the first occurrence is on line 158 | 158 |
The String literal "ResultInfos" appears 12 times in this file; the first occurrence is on line 160 | 160 |
The String literal "Success" appears 6 times in this file; the first occurrence is on line 160 | 160 |
The String literal "true" appears 6 times in this file; the first occurrence is on line 162 | 162 |
Position literals first in String comparisons | 162 |
The String literal "ResultData" appears 4 times in this file; the first occurrence is on line 164 | 164 |
The String literal "ErrorMessage" appears 6 times in this file; the first occurrence is on line 168 | 168 |
The String literal "Error Eudonet : " appears 5 times in this file; the first occurrence is on line 169 | 169 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 174 |
Do not add empty strings | 192 |
Avoid using Literals in Conditional Statements | 193 |
Position literals first in String comparisons | 201 |
Avoid using if statements without curly braces | 208–209 |
Do not add empty strings | 213 |
Do not add empty strings | 214 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 232 |
Do not add empty strings | 256 |
Avoid using Literals in Conditional Statements | 257 |
Position literals first in String comparisons | 265 |
Avoid using if statements without curly braces | 272–273 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 288 |
Avoid using Literals in Conditional Statements | 312 |
Position literals first in String comparisons | 320 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 337 |
Position literals first in String comparisons | 356 |
Do not add empty strings | 372 |
Do not add empty strings | 387 |
Avoid using Literals in Conditional Statements | 391 |
Position literals first in String comparisons | 397 |
Do not add empty strings | 421 |
Avoid using Literals in Conditional Statements | 425 |
Position literals first in String comparisons | 431 |
Violation | Ligne |
---|---|
It is a good practice to call super() in a constructor | 55–59 |
It is a good practice to call super() in a constructor | 67–70 |
Violation | Ligne |
---|---|
Possible God class (WMC=64, ATFD=117, TCC=0.05714285714285714) | 34–678 |
A high number of imports can indicate a high degree of coupling within an object. | 34–678 |
Avoid unused imports such as 'fr.paris.lutece.plugins.directory.business.EntryFilter' | 37 |
Avoid unused imports such as 'fr.paris.lutece.plugins.directory.business.EntryFilter' | 37 |
The class 'EudonetRestTaskComponent' has a Cyclomatic Complexity of 4 (Highest = 15). | 83–678 |
The method doSaveConfig() has an NPath complexity of 880 | 136–225 |
The method 'doSaveConfig' has a Cyclomatic Complexity of 15. | 136–225 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 139 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 140 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 141 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 142 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 143 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 144 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 145 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 146 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 147 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 233 |
Avoid using Literals in Conditional Statements | 544 |
The String literal "object" appears 12 times in this file; the first occurrence is on line 548 | 548 |
The String literal "ResultInfos" appears 6 times in this file; the first occurrence is on line 549 | 549 |
Position literals first in String comparisons | 550 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 561 |
Avoid using Literals in Conditional Statements | 577 |
Position literals first in String comparisons | 583 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 595 |
Avoid using Literals in Conditional Statements | 614 |
Position literals first in String comparisons | 620 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 634 |