Résultats PMD
Le document suivant contient les résultats de PMD 5.5.1.
Fichiers
fr/paris/lutece/plugins/statistics/elasticsearch/ElasticSearchClient.java
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. |
22–107 |
The field name indicates a constant but its modifiers do not |
29 |
The field name indicates a constant but its modifiers do not |
30 |
The field name indicates a constant but its modifiers do not |
32 |
fr/paris/lutece/plugins/statistics/model/UserStatistic.java
Violation |
Ligne |
This class has a bunch of public methods and attributes |
1–353 |
Too many fields |
8–353 |
The String literal "yyyy-MM-dd HH:mm:ss.SSS" appears 4 times in this file; the first occurrence is on line 12 |
12 |
fr/paris/lutece/plugins/statistics/rest/StatisticsRest.java
Violation |
Ligne |
Avoid catching NullPointerException; consider removing the cause of the NPE. |
122 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
122 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
126 |
Avoid variables with short names like ex |
143 |
fr/paris/lutece/plugins/statistics/service/UserStatisticEncryptionService.java
Violation |
Ligne |
Avoid using redundant field initializer for 'bIsInitialized' |
30 |
Perhaps 'keySpec' could be replaced by a local variable. |
32 |
Private field 'keySpec' could be made final; it is only initialized in the declaration or constructor. |
32 |
Private field 'key' could be made final; it is only initialized in the declaration or constructor. |
33 |
Avoid variables with short names like iv |
34 |
Private field 'iv' could be made final; it is only initialized in the declaration or constructor. |
34 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
62 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
62 |
Avoid variables with short names like md |
64 |
Use one line for each declaration, it enhances code readability. |
68 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
80 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
80 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
94 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
94 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
108 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
108 |
Avoid using if statements without curly braces |
113–114 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
126 |
A method/constructor shouldnt explicitly throw java.lang.Exception |
126 |
Avoid using if statements without curly braces |
131–132 |
fr/paris/lutece/plugins/statistics/tools/DateHelper.java
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. |
10–252 |
When instantiating a SimpleDateFormat object, specify a Locale |
54 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. |
144 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. |
145 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. |
146 |
fr/paris/lutece/plugins/statistics/tools/Encrypter.java
Violation |
Ligne |
Perhaps 'keySpec' could be replaced by a local variable. |
16 |
Avoid variables with short names like iv |
18 |
Avoid variables with short names like md |
22 |
Use one line for each declaration, it enhances code readability. |
25 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
34 |
Avoid printStackTrace(); use a logger call instead. |
35 |
Avoid using if statements without curly braces |
44–45 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
55 |
Avoid printStackTrace(); use a logger call instead. |
56 |
Avoid using if statements without curly braces |
66–67 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
77 |
Avoid printStackTrace(); use a logger call instead. |
78 |
fr/paris/lutece/plugins/statistics/tools/ObjectConverter.java
Violation |
Ligne |
Avoid using redundant field initializer for 'bIsInitialized' |
25 |
Private field 'mapperFactory' could be made final; it is only initialized in the declaration or constructor. |
26 |
The String literal "connectionId" appears 4 times in this file; the first occurrence is on line 77 |
77 |
The String literal "customerId" appears 4 times in this file; the first occurrence is on line 78 |
78 |
Avoid variables with short names like us |
81 |