Fork me on GitHub

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/blog/service/NewsletterBlogService.java

Rule Violation Ligne
LocalVariableNamingConventions The local variable name '_bTemplate' doesn't match '[a-z][a-zA-Z0-9]*' 307

Priority 3

fr/paris/lutece/plugins/newsletter/modules/blog/business/INewsletterBlogDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 42161

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlogDAO.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 46259
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 159
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 218

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlogHome.java

Rule Violation Ligne
TooManyMethods This class has too many methods, consider refactoring it. 52248

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlogTemplateRemovalListener.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like id 63

fr/paris/lutece/plugins/newsletter/modules/blog/service/NewsletterBlogService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34343
UnusedPrivateField Avoid unused private fields such as 'MARK_FILE_ID'. 81
UnusedPrivateField Avoid unused private fields such as 'DOCUMENT_RESOURCE_SERVLET_URL'. 83
UnusedPrivateField Avoid unused private fields such as '_newsletterService'. 86
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 86
NPathComplexity The method 'generateDocumentsList(NewsletterBlog, int, Timestamp, String, AdminUser, Locale)' has an NPath complexity of 243 145207
CyclomaticComplexity The method 'generateDocumentsList(NewsletterBlog, int, Timestamp, String, AdminUser, Locale)' has a cyclomatic complexity of 15. 145207
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 149
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 153
UseUnderscoresInNumericLiterals Number 86400000 should separate every third digit with an underscore 154
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 154
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 177
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 193
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 227
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 227
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 228
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 237
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 248
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 279
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 280
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 289
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 300

fr/paris/lutece/plugins/newsletter/modules/blog/service/NewsletterBlogTopicService.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34387
UnusedPrivateField Avoid unused private fields such as 'BLOGSLIST_PORTLET'. 79
UnusedPrivateField Avoid unused private fields such as 'MARK_USE_CATEGORIES'. 100
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 144
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 144
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 164
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 236240
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 249253
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 279
ConfusingTernary Avoid if (x != y) ..; else ..; 373380

fr/paris/lutece/plugins/newsletter/modules/blog/util/BlogNewsletterDocument.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_IMG'. 52
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_A'. 53
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_SUBSTRING_BEGIN'. 54
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_SUBSTRING_END'. 55
UnusedPrivateField Avoid unused private fields such as '_newsletterDocumentService'. 57

fr/paris/lutece/plugins/newsletter/modules/blog/util/NewsletterBlogUtils.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like i 99

fr/paris/lutece/plugins/newsletter/modules/blog/web/NewsletterDocumentServiceJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34267
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 118
UnusedPrivateField Avoid unused private fields such as '_newsletterService'. 118
ConfusingTernary Avoid if (x != y) ..; else ..; 136
ConfusingTernary Avoid if (x != y) ..; else ..; 142
ConfusingTernary Avoid if (x != y) ..; else ..; 145
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 148
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 148
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 207
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 209
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 210
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 211
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 211
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 211
ConfusingTernary Avoid if (x != y) ..; else ..; 213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 220
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 222

Priority 4

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlog.java

Rule Violation Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 9295

fr/paris/lutece/plugins/newsletter/modules/blog/service/NewsletterBlogService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.newsletter.business.NewsLetterTemplate' 58
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.GregorianCalendar' due to existing import 'java.util.GregorianCalendar' 152

fr/paris/lutece/plugins/newsletter/modules/blog/service/NewsletterBlogTopicService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.business.portlet.BlogListPortlet' 36
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.ArrayList' due to existing import 'java.util.ArrayList' 193

fr/paris/lutece/plugins/newsletter/modules/blog/util/BlogNewsletterDocument.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.business.Blog' 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.service.BlogService' 37
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.newsletter.util.NewsLetterConstants' 40
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 42
UnusedImports Avoid unused imports such as 'org.w3c.dom.NamedNodeMap' 43
UnusedImports Avoid unused imports such as 'org.w3c.dom.Node' 44
UnusedImports Avoid unused imports such as 'org.w3c.dom.NodeList' 45

fr/paris/lutece/plugins/newsletter/modules/blog/util/NewsletterBlogUtils.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 36

fr/paris/lutece/plugins/newsletter/modules/blog/web/NewsletterDocumentServiceJspBean.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.newsletter.modules.blog.util.NewsletterBlogUtils' 43
UnusedImports Avoid unused imports such as 'java.util.ArrayList' 64

Fichiers

fr/paris/lutece/plugins/newsletter/modules/blog/business/INewsletterBlogDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 42161

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlog.java

Rule Violation Priority Ligne
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 9295

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlogDAO.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 46259
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 159
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 218

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlogHome.java

Rule Violation Priority Ligne
TooManyMethods This class has too many methods, consider refactoring it. 3 52248

fr/paris/lutece/plugins/newsletter/modules/blog/business/NewsletterBlogTemplateRemovalListener.java

Rule Violation Priority Ligne
ShortVariable Avoid variables with short names like id 3 63

fr/paris/lutece/plugins/newsletter/modules/blog/service/NewsletterBlogService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34343
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.newsletter.business.NewsLetterTemplate' 4 58
UnusedPrivateField Avoid unused private fields such as 'MARK_FILE_ID'. 3 81
UnusedPrivateField Avoid unused private fields such as 'DOCUMENT_RESOURCE_SERVLET_URL'. 3 83
UnusedPrivateField Avoid unused private fields such as '_newsletterService'. 3 86
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 3 86
NPathComplexity The method 'generateDocumentsList(NewsletterBlog, int, Timestamp, String, AdminUser, Locale)' has an NPath complexity of 243 3 145207
CyclomaticComplexity The method 'generateDocumentsList(NewsletterBlog, int, Timestamp, String, AdminUser, Locale)' has a cyclomatic complexity of 15. 3 145207
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 149
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.GregorianCalendar' due to existing import 'java.util.GregorianCalendar' 4 152
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 153
UseUnderscoresInNumericLiterals Number 86400000 should separate every third digit with an underscore 3 154
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 154
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 177
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 193
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 227
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 227
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 228
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 237
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 248
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 279
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 279
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 280
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 289
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 300
LocalVariableNamingConventions The local variable name '_bTemplate' doesn't match '[a-z][a-zA-Z0-9]*' 1 307

fr/paris/lutece/plugins/newsletter/modules/blog/service/NewsletterBlogTopicService.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34387
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.business.portlet.BlogListPortlet' 4 36
UnusedPrivateField Avoid unused private fields such as 'BLOGSLIST_PORTLET'. 3 79
UnusedPrivateField Avoid unused private fields such as 'MARK_USE_CATEGORIES'. 3 100
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 144
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 144
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 164
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.ArrayList' due to existing import 'java.util.ArrayList' 4 193
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 236240
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 249253
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 279
ConfusingTernary Avoid if (x != y) ..; else ..; 3 373380

fr/paris/lutece/plugins/newsletter/modules/blog/util/BlogNewsletterDocument.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.business.Blog' 4 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.service.BlogService' 4 37
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.newsletter.util.NewsLetterConstants' 4 40
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 4 42
UnusedImports Avoid unused imports such as 'org.w3c.dom.NamedNodeMap' 4 43
UnusedImports Avoid unused imports such as 'org.w3c.dom.Node' 4 44
UnusedImports Avoid unused imports such as 'org.w3c.dom.NodeList' 4 45
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_IMG'. 3 52
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_A'. 3 53
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_SUBSTRING_BEGIN'. 3 54
UnusedPrivateField Avoid unused private fields such as 'CONSTANT_SUBSTRING_END'. 3 55
UnusedPrivateField Avoid unused private fields such as '_newsletterDocumentService'. 3 57

fr/paris/lutece/plugins/newsletter/modules/blog/util/NewsletterBlogUtils.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 4 36
ShortVariable Avoid variables with short names like i 3 99

fr/paris/lutece/plugins/newsletter/modules/blog/web/NewsletterDocumentServiceJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34267
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.newsletter.modules.blog.util.NewsletterBlogUtils' 4 43
UnusedImports Avoid unused imports such as 'java.util.ArrayList' 4 64
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 3 118
UnusedPrivateField Avoid unused private fields such as '_newsletterService'. 3 118
ConfusingTernary Avoid if (x != y) ..; else ..; 3 136
ConfusingTernary Avoid if (x != y) ..; else ..; 3 142
ConfusingTernary Avoid if (x != y) ..; else ..; 3 145
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 148
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 148
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 207
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 209
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 210
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 211
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 211
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 211
ConfusingTernary Avoid if (x != y) ..; else ..; 3 213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 220
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 222