Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 3

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

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

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

Rule Violation Line
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 Line
TooManyMethods This class has too many methods, consider refactoring it. 52248

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

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

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34278
UnusedPrivateField Avoid unused private fields such as 'MARK_FILE_ID'. 80
UnusedPrivateField Avoid unused private fields such as 'DOCUMENT_RESOURCE_SERVLET_URL'. 82
UnusedPrivateField Avoid unused private fields such as '_newsletterService'. 85
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 85
CyclomaticComplexity The method 'generateDocumentsList(NewsletterBlog, int, Timestamp, String, AdminUser, Locale)' has a cyclomatic complexity of 12. 144199
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 148
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 151
UseUnderscoresInNumericLiterals Number 86400000 should separate every third digit with an underscore 152
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 152
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 175
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 191
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strContent' 198
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 219
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 219
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 220
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 229
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 240

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

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

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

Rule Violation Line
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 Line
ShortVariable Avoid variables with short names like i 99

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34257
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
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 148
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 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
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
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 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 Line
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 Line
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.GregorianCalendar' due to existing import 'java.util.GregorianCalendar' 150

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

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.blog.business.portlet.BlogListPortlet' 36

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

Rule Violation Line
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 Line
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 36

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

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

Files

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

Rule Violation Priority Line
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 Line
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 Line
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 Line
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 Line
ShortVariable Avoid variables with short names like id 3 63

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34278
UnusedPrivateField Avoid unused private fields such as 'MARK_FILE_ID'. 3 80
UnusedPrivateField Avoid unused private fields such as 'DOCUMENT_RESOURCE_SERVLET_URL'. 3 82
UnusedPrivateField Avoid unused private fields such as '_newsletterService'. 3 85
ImmutableField Private field '_newsletterService' could be made final; it is only initialized in the declaration or constructor. 3 85
CyclomaticComplexity The method 'generateDocumentsList(NewsletterBlog, int, Timestamp, String, AdminUser, Locale)' has a cyclomatic complexity of 12. 3 144199
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 148
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.GregorianCalendar' due to existing import 'java.util.GregorianCalendar' 4 150
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 151
UseUnderscoresInNumericLiterals Number 86400000 should separate every third digit with an underscore 3 152
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 152
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 175
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 191
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strContent' 3 198
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 219
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 219
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 220
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 229
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 240

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34368
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 78
UnusedPrivateField Avoid unused private fields such as 'MARK_USE_CATEGORIES'. 3 99
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 143
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 163
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 217221
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 230234
UseCollectionIsEmpty Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 3 260
ConfusingTernary Avoid if (x != y) ..; else ..; 3 354361

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

Rule Violation Priority Line
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 Line
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 Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34257
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
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 148
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 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
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
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 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