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/tagcloud/business/ITagDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 47–139
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 95

fr/paris/lutece/plugins/tagcloud/business/TagCloudDAO.java

Rule Violation Line
TooManyMethods This class has too many methods, consider refactoring it. 48–383
MissingOverride The method 'insert(Tag, Plugin)' is missing an @Override annotation. 117–131
MissingOverride The method 'load(int, int, Plugin)' is missing an @Override annotation. 140–163
MissingOverride The method 'loadByCloud(int, Plugin)' is missing an @Override annotation. 171–196
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 177
MissingOverride The method 'deleteTag(int, int, Plugin)' is missing an @Override annotation. 204–211
MissingOverride The method 'store(Tag, Plugin)' is missing an @Override annotation. 218–231
MissingOverride The method 'selectTagList(Plugin)' is missing an @Override annotation. 238–260
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 240
MissingOverride The method 'selectTagClouds(Plugin)' is missing an @Override annotation. 267–286
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 269
MissingOverride The method 'selectCloudById(int, Plugin)' is missing an @Override annotation. 294–312
MissingOverride The method 'insert(TagCloud, Plugin)' is missing an @Override annotation. 319–329
MissingOverride The method 'store(TagCloud, Plugin)' is missing an @Override annotation. 336–345
MissingOverride The method 'deleteCloud(int, Plugin)' is missing an @Override annotation. 352–358
MissingOverride The method 'selectAllTagClouds(Plugin)' is missing an @Override annotation. 365–382

fr/paris/lutece/plugins/tagcloud/business/TagHome.java

Rule Violation Line
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 117

fr/paris/lutece/plugins/tagcloud/business/portlet/ITagCloudPortletDAO.java

Rule Violation Line
MissingOverride The method 'delete(int)' is missing an @Override annotation. 51

fr/paris/lutece/plugins/tagcloud/business/portlet/TagCloudPortlet.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 70–73
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 81–84
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 92–134
ConfusingTernary Avoid if (x != y) ..; else ..; 107–127
MissingOverride The method 'remove()' is missing an @Override annotation. 147–150

fr/paris/lutece/plugins/tagcloud/business/portlet/TagCloudPortletDAO.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 62–63
MissingOverride The method 'load(int)' is missing an @Override annotation. 71–90
MissingOverride The method 'delete(int)' is missing an @Override annotation. 97–103
UncommentedEmptyMethodBody Document empty method body 110–111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 120
MissingOverride The method 'selectTagCloudByPortlet(int)' is missing an @Override annotation. 144–159
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 146
MissingOverride The method 'insertCloud(int, int)' is missing an @Override annotation. 166–175
MissingOverride The method 'storeCloud(int, int)' is missing an @Override annotation. 182–192
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 198–202
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 208–211

fr/paris/lutece/plugins/tagcloud/business/portlet/TagCloudPortletHome.java

Rule Violation Line
RedundantFieldInitializer Avoid using redundant field initializer for '_singleton' 54
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 54
CallSuperInConstructor It is a good practice to call super() in a constructor 59–65
NonThreadSafeSingleton Singleton is not thread safe 74–77
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 87–93
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 92
MissingOverride The method 'getDAO()' is missing an @Override annotation. 100–103

fr/paris/lutece/plugins/tagcloud/service/ITransformationService.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 47
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 47
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 47

fr/paris/lutece/plugins/tagcloud/service/RandomTagService.java

Rule Violation Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 49–51
CommentRequired Public method and constructor comments are required 49–51
UncommentedEmptyConstructor Document empty constructor 49–51
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 58
MissingOverride The method 'transform(ArrayList)' is missing an @Override annotation. 58–72
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 58

fr/paris/lutece/plugins/tagcloud/web/TagCloudJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 60–448
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 112
CallSuperInConstructor It is a good practice to call super() in a constructor 121–124
AddEmptyString Do not add empty strings 146
AddEmptyString Do not add empty strings 181
PositionLiteralsFirstInComparisons Position literals first in String comparisons 217
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 240
PositionLiteralsFirstInComparisons Position literals first in String comparisons 242
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 353
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 355
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 356
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 385
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 386
AddEmptyString Do not add empty strings 443
AddEmptyString Do not add empty strings 443

fr/paris/lutece/plugins/tagcloud/web/portlet/TagCloudPortletJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 55–220
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 95–109
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 116–132
AddEmptyString Do not add empty strings 128
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 139–167
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 144
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 147
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 175–202

Priority 4

fr/paris/lutece/plugins/tagcloud/business/Tag.java

Rule Violation Line
ShortClassName Avoid short class names like Tag 40–138

Files

fr/paris/lutece/plugins/tagcloud/business/ITagDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 47–139
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 95

fr/paris/lutece/plugins/tagcloud/business/Tag.java

Rule Violation Priority Line
ShortClassName Avoid short class names like Tag 4 40–138

fr/paris/lutece/plugins/tagcloud/business/TagCloudDAO.java

Rule Violation Priority Line
TooManyMethods This class has too many methods, consider refactoring it. 3 48–383
MissingOverride The method 'insert(Tag, Plugin)' is missing an @Override annotation. 3 117–131
MissingOverride The method 'load(int, int, Plugin)' is missing an @Override annotation. 3 140–163
MissingOverride The method 'loadByCloud(int, Plugin)' is missing an @Override annotation. 3 171–196
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 177
MissingOverride The method 'deleteTag(int, int, Plugin)' is missing an @Override annotation. 3 204–211
MissingOverride The method 'store(Tag, Plugin)' is missing an @Override annotation. 3 218–231
MissingOverride The method 'selectTagList(Plugin)' is missing an @Override annotation. 3 238–260
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 240
MissingOverride The method 'selectTagClouds(Plugin)' is missing an @Override annotation. 3 267–286
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 269
MissingOverride The method 'selectCloudById(int, Plugin)' is missing an @Override annotation. 3 294–312
MissingOverride The method 'insert(TagCloud, Plugin)' is missing an @Override annotation. 3 319–329
MissingOverride The method 'store(TagCloud, Plugin)' is missing an @Override annotation. 3 336–345
MissingOverride The method 'deleteCloud(int, Plugin)' is missing an @Override annotation. 3 352–358
MissingOverride The method 'selectAllTagClouds(Plugin)' is missing an @Override annotation. 3 365–382

fr/paris/lutece/plugins/tagcloud/business/TagHome.java

Rule Violation Priority Line
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 117

fr/paris/lutece/plugins/tagcloud/business/portlet/ITagCloudPortletDAO.java

Rule Violation Priority Line
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 51

fr/paris/lutece/plugins/tagcloud/business/portlet/TagCloudPortlet.java

Rule Violation Priority Line
CallSuperInConstructor It is a good practice to call super() in a constructor 3 70–73
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 81–84
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 92–134
ConfusingTernary Avoid if (x != y) ..; else ..; 3 107–127
MissingOverride The method 'remove()' is missing an @Override annotation. 3 147–150

fr/paris/lutece/plugins/tagcloud/business/portlet/TagCloudPortletDAO.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 62–63
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 71–90
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 97–103
UncommentedEmptyMethodBody Document empty method body 3 110–111
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 120
MissingOverride The method 'selectTagCloudByPortlet(int)' is missing an @Override annotation. 3 144–159
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 146
MissingOverride The method 'insertCloud(int, int)' is missing an @Override annotation. 3 166–175
MissingOverride The method 'storeCloud(int, int)' is missing an @Override annotation. 3 182–192
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 198–202
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 208–211

fr/paris/lutece/plugins/tagcloud/business/portlet/TagCloudPortletHome.java

Rule Violation Priority Line
RedundantFieldInitializer Avoid using redundant field initializer for '_singleton' 3 54
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 54
CallSuperInConstructor It is a good practice to call super() in a constructor 3 59–65
NonThreadSafeSingleton Singleton is not thread safe 3 74–77
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 3 87–93
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 3 92
MissingOverride The method 'getDAO()' is missing an @Override annotation. 3 100–103

fr/paris/lutece/plugins/tagcloud/service/ITransformationService.java

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 47
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 47
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 47

fr/paris/lutece/plugins/tagcloud/service/RandomTagService.java

Rule Violation Priority Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 49–51
CommentRequired Public method and constructor comments are required 3 49–51
UncommentedEmptyConstructor Document empty constructor 3 49–51
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 58
MissingOverride The method 'transform(ArrayList)' is missing an @Override annotation. 3 58–72
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 58

fr/paris/lutece/plugins/tagcloud/web/TagCloudJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 60–448
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 3 112
CallSuperInConstructor It is a good practice to call super() in a constructor 3 121–124
AddEmptyString Do not add empty strings 3 146
AddEmptyString Do not add empty strings 3 181
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 217
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 240
PositionLiteralsFirstInComparisons Position literals first in String comparisons 3 242
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 353
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 355
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 356
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 385
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 386
AddEmptyString Do not add empty strings 3 443
AddEmptyString Do not add empty strings 3 443

fr/paris/lutece/plugins/tagcloud/web/portlet/TagCloudPortletJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 55–220
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 3 95–109
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 3 116–132
AddEmptyString Do not add empty strings 3 128
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 3 139–167
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 144
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 147
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 3 175–202