Résultats PMD
Le document suivant contient les résultats de PMD 6.13.0.
Violations By Priority
Priority 1
fr/paris/lutece/plugins/newsletter/modules/document/service/NewsletterDocumentService.java
Rule |
Violation |
Ligne |
AvoidFileStream |
Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter |
140 |
Priority 3
fr/paris/lutece/plugins/newsletter/modules/document/business/INewsletterDocumentDAO.java
Rule |
Violation |
Ligne |
TooManyMethods |
This class has too many methods, consider refactoring it. |
50–160 |
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocumentDAO.java
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocumentHome.java
Rule |
Violation |
Ligne |
TooManyMethods |
This class has too many methods, consider refactoring it. |
54–236 |
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocumentTemplateRemovalListener.java
Rule |
Violation |
Ligne |
ShortVariable |
Avoid variables with short names like id |
65 |
fr/paris/lutece/plugins/newsletter/modules/document/service/NewsletterDocumentService.java
Rule |
Violation |
Ligne |
ExcessiveImports |
A high number of imports can indicate a high degree of coupling within an object. |
34–303 |
ImmutableField |
Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. |
91 |
UseTryWithResources |
Consider using a try-with-resources statement instead of explicitly closing the resource |
128–154 |
AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
133–136 |
CollapsibleIfStatements |
These nested if statements could be combined |
133–136 |
AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
147 |
IdenticalCatchBranches |
'catch' branch identical to 'IOException' branch |
147–150 |
CyclomaticComplexity |
The method 'generateDocumentsList(NewsletterDocument, int, Timestamp, String, AdminUser, Locale)' has a cyclomatic complexity of 12. |
174–236 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
178 |
UseCollectionIsEmpty |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() |
206 |
UseCollectionIsEmpty |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() |
254 |
UseDiamondOperator |
Explicit type arguments can be replaced by Diamond Operator |
257 |
UseConcurrentHashMap |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation |
257 |
fr/paris/lutece/plugins/newsletter/modules/document/service/NewsletterDocumentTopicService.java
fr/paris/lutece/plugins/newsletter/modules/document/util/HtmlDomDocNewsletterDocument.java
fr/paris/lutece/plugins/newsletter/modules/document/util/NewsletterDocumentUtils.java
fr/paris/lutece/plugins/newsletter/modules/document/web/NewsletterDocumentServiceJspBean.java
Priority 4
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocument.java
Fichiers
fr/paris/lutece/plugins/newsletter/modules/document/business/INewsletterDocumentDAO.java
Rule |
Violation |
Priority |
Ligne |
TooManyMethods |
This class has too many methods, consider refactoring it. |
3 |
50–160 |
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocument.java
Rule |
Violation |
Priority |
Ligne |
BooleanGetMethodName |
A getX() method which returns a boolean should be named isX() |
4 |
88–91 |
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocumentDAO.java
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocumentHome.java
Rule |
Violation |
Priority |
Ligne |
TooManyMethods |
This class has too many methods, consider refactoring it. |
3 |
54–236 |
fr/paris/lutece/plugins/newsletter/modules/document/business/NewsletterDocumentTemplateRemovalListener.java
Rule |
Violation |
Priority |
Ligne |
ShortVariable |
Avoid variables with short names like id |
3 |
65 |
fr/paris/lutece/plugins/newsletter/modules/document/service/NewsletterDocumentService.java
Rule |
Violation |
Priority |
Ligne |
ExcessiveImports |
A high number of imports can indicate a high degree of coupling within an object. |
3 |
34–303 |
ImmutableField |
Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. |
3 |
91 |
UseTryWithResources |
Consider using a try-with-resources statement instead of explicitly closing the resource |
3 |
128–154 |
AvoidDeeplyNestedIfStmts |
Deeply nested if..then statements are hard to read |
3 |
133–136 |
CollapsibleIfStatements |
These nested if statements could be combined |
3 |
133–136 |
AvoidFileStream |
Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter |
1 |
140 |
AvoidCatchingGenericException |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block |
3 |
147 |
IdenticalCatchBranches |
'catch' branch identical to 'IOException' branch |
3 |
147–150 |
CyclomaticComplexity |
The method 'generateDocumentsList(NewsletterDocument, int, Timestamp, String, AdminUser, Locale)' has a cyclomatic complexity of 12. |
3 |
174–236 |
PrematureDeclaration |
Avoid declaring a variable if it is unreferenced before a possible exit point. |
3 |
178 |
UseCollectionIsEmpty |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() |
3 |
206 |
UseCollectionIsEmpty |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() |
3 |
254 |
UseDiamondOperator |
Explicit type arguments can be replaced by Diamond Operator |
3 |
257 |
UseConcurrentHashMap |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation |
3 |
257 |
fr/paris/lutece/plugins/newsletter/modules/document/service/NewsletterDocumentTopicService.java
fr/paris/lutece/plugins/newsletter/modules/document/util/HtmlDomDocNewsletterDocument.java
fr/paris/lutece/plugins/newsletter/modules/document/util/NewsletterDocumentUtils.java
Rule |
Violation |
Priority |
Ligne |
UseObjectForClearerAPI |
Rather than using a lot of String arguments, consider using a container object for those values. |
3 |
68–69 |
ShortVariable |
Avoid variables with short names like i |
3 |
99 |
fr/paris/lutece/plugins/newsletter/modules/document/web/NewsletterDocumentServiceJspBean.java