Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.5.1.

Files

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/business/EudonetLinkHome.java

Violation Line
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. 892

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/business/EudonetRestData.java

Violation Line
Avoid variables with short names like id 65

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/business/ReferenceItemSorted.java

Violation Line
Avoid variables with short names like o 8

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/business/TaskEudonetRestConfigHome.java

Violation Line
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. 4780

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/BuildJsonBodyService.java

Violation Line
Possible God class (WMC=55, ATFD=61, TCC=0.01818181818181818) 1422
The class 'BuildJsonBodyService' has a Modified Cyclomatic Complexity of 4 (Highest = 14). 35422
The class 'BuildJsonBodyService' has a Cyclomatic Complexity of 5 (Highest = 17). 35422
The class 'BuildJsonBodyService' has a Standard Cyclomatic Complexity of 4 (Highest = 14). 35422
Avoid unused private fields such as 'PROPERTY_ENTRY_TYPE_IMAGE'. 39
Singleton is not thread safe 5560
The method getRecordFieldValue() has an NPath complexity of 1264 91180
The method 'getRecordFieldValue' has a Standard Cyclomatic Complexity of 14. 91180
The method 'getRecordFieldValue' has a Cyclomatic Complexity of 17. 91180
The method 'getRecordFieldValue' has a Modified Cyclomatic Complexity of 14. 91180
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 157158
Avoid empty catch blocks 161164
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 264265
When instantiating a SimpleDateFormat object, specify a Locale 280
Avoid using if statements without curly braces 282283
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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/EudonetClient.java

Violation Line
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 3035
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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/EudonetRestDirectoryPlugin.java

Violation Line
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. 4562

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/EudonetRestWsEudonetRest.java

Violation Line
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. 4685
Singleton is not thread safe 5760

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/EudonetRestWsService.java

Violation Line
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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/IEudonetRestWsService.java

Violation Line
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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/TaskExportDemand.java

Violation Line
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 107
Avoid throwing raw exception types. 110

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/service/daemon/PurgeResourceDaemon.java

Violation Line
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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/threadService/AcdpThread.java

Violation Line
Package name contains upper case characters 1
Possible God class (WMC=60, ATFD=53, TCC=0.2087912087912088) 1490
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 5968
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 208209
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 272273
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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/utils/EudonetRestException.java

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

fr/paris/lutece/plugins/workflow/modules/eudonetrestdirectory/web/EudonetRestTaskComponent.java

Violation Line
Possible God class (WMC=64, ATFD=117, TCC=0.05714285714285714) 34678
A high number of imports can indicate a high degree of coupling within an object. 34678
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). 83678
The method doSaveConfig() has an NPath complexity of 880 136225
The method 'doSaveConfig' has a Cyclomatic Complexity of 15. 136225
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