Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/folderlisting/service/FolderLoaderProperties.java

Rule Violation Line
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 135

fr/paris/lutece/plugins/folderlisting/service/FolderService.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 44139

fr/paris/lutece/plugins/folderlisting/web/FolderListingFileJspBean.java

Rule Violation Line
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 105153
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 120

Priority 2

fr/paris/lutece/plugins/folderlisting/web/FolderListingDatabaseJspBean.java

Rule Violation Line
AvoidReassigningParameters Avoid reassigning parameters such as 'strFolderPath' 302
AvoidReassigningParameters Avoid reassigning parameters such as 'strPath' 322

fr/paris/lutece/plugins/folderlisting/web/portlet/FolderListingPortletJspBean.java

Rule Violation Line
SystemPrintln System.out.println is used 93
SystemPrintln System.out.println is used 96

Priority 3

fr/paris/lutece/plugins/folderlisting/business/FolderListingDatabase.java

Rule Violation Line
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 115118

fr/paris/lutece/plugins/folderlisting/business/FolderListingDatabaseDAO.java

Rule Violation Line
MissingOverride The method 'insert(FolderListingDatabase, Plugin)' is missing an @Override annotation. 8798
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 106126
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 133139
MissingOverride The method 'store(FolderListingDatabase, Plugin)' is missing an @Override annotation. 146157
MissingOverride The method 'selectFolderListingDatabaseList(Plugin)' is missing an @Override annotation. 164184

fr/paris/lutece/plugins/folderlisting/business/FolderListingDatabaseHome.java

Rule Violation Line
UseUtilityClass 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. 46114

fr/paris/lutece/plugins/folderlisting/business/FolderListingHome.java

Rule Violation Line
UseUtilityClass 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. 55132
ShortVariable Avoid variables with short names like f 72
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 85
AddEmptyString Do not add empty strings 91
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 118

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortlet.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 7376
ConfusingTernary Avoid if (x != y) ..; else ..; 148155
ConfusingTernary Avoid if (x != y) ..; else ..; 170177
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 188225
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 275278
MissingOverride The method 'remove()' is missing an @Override annotation. 291294

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortletDAO.java

Rule Violation Line
MissingOverride The method 'delete(int)' is missing an @Override annotation. 6268
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 7583
ShortVariable Avoid variables with short names like p 77
MissingOverride The method 'load(int)' is missing an @Override annotation. 92109
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 116127
ShortVariable Avoid variables with short names like p 118
MissingOverride The method 'checkNoFolderInPortlet(int)' is missing an @Override annotation. 134149

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortletHome.java

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

fr/paris/lutece/plugins/folderlisting/business/portlet/IFolderListingPortletDAO.java

Rule Violation Line
MissingOverride The method 'delete(int)' is missing an @Override annotation. 50
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 56
MissingOverride The method 'load(int)' is missing an @Override annotation. 63
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 69

fr/paris/lutece/plugins/folderlisting/service/Folder.java

Rule Violation Line
CommentRequired Header comments are required 41141
NonThreadSafeSingleton Singleton is not thread safe 5761
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 128131

fr/paris/lutece/plugins/folderlisting/service/FolderListingPlugin.java

Rule Violation Line
CommentRequired Header comments are required 3951
MissingOverride The method 'init()' is missing an @Override annotation. 4650

fr/paris/lutece/plugins/folderlisting/service/FolderLoaderDatabase.java

Rule Violation Line
CommentRequired Header comments are required 47114
DefaultPackage Use explicit scoping instead of the default package private level 50
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _plugin field if you want a default access modifier 50
MissingOverride The method 'getResources()' is missing an @Override annotation. 5672
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 7989

fr/paris/lutece/plugins/folderlisting/service/FolderLoaderProperties.java

Rule Violation Line
CommentRequired Header comments are required 53151
ImmutableField Private field '_strFolderFilesPath' could be made final; it is only initialized in the declaration or constructor. 62
MissingOverride The method 'getResources()' is missing an @Override annotation. 77102
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 109121
ShortVariable Avoid variables with short names like is 135

fr/paris/lutece/plugins/folderlisting/service/FolderService.java

Rule Violation Line
CommentRequired Header comments are required 44139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 119
MissingOverride The method 'getLoadersProperty()' is missing an @Override annotation. 135138

fr/paris/lutece/plugins/folderlisting/service/FolderWorkgroupRemovalListener.java

Rule Violation Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 5573
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 8185

fr/paris/lutece/plugins/folderlisting/web/FolderListingDatabaseJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62331
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 102
CommentRequired Public method and constructor comments are required 104107
CallSuperInConstructor It is a good practice to call super() in a constructor 104107
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 118
AddEmptyString Do not add empty strings 153
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 269
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 271
SimplifyStartsWith This call to String.startsWith can be rewritten using String.charAt(0) 324

fr/paris/lutece/plugins/folderlisting/web/FolderListingFileJspBean.java

Rule Violation Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 7981
UncommentedEmptyConstructor Document empty constructor 7981
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strDirPath' 95
ShortVariable Avoid variables with short names like in 121
IdenticalCatchBranches 'catch' branch identical to 'FileNotFoundException' branch 144149
CommentRequired Public method and constructor comments are required 155189
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strUrl' 188
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strFileName' 202

fr/paris/lutece/plugins/folderlisting/web/portlet/FolderListingPortletJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 61280
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 90113
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 122142
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 161190
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 165
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 166
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 199230
DefaultPackage Use explicit scoping instead of the default package private level 240249
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getFolderIndexCombo method if you want a default access modifier 240249

Priority 4

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortletDAO.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO' 36

Files

fr/paris/lutece/plugins/folderlisting/business/FolderListingDatabase.java

Rule Violation Priority Line
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 115118

fr/paris/lutece/plugins/folderlisting/business/FolderListingDatabaseDAO.java

Rule Violation Priority Line
MissingOverride The method 'insert(FolderListingDatabase, Plugin)' is missing an @Override annotation. 3 8798
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 106126
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 133139
MissingOverride The method 'store(FolderListingDatabase, Plugin)' is missing an @Override annotation. 3 146157
MissingOverride The method 'selectFolderListingDatabaseList(Plugin)' is missing an @Override annotation. 3 164184

fr/paris/lutece/plugins/folderlisting/business/FolderListingDatabaseHome.java

Rule Violation Priority Line
UseUtilityClass 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. 3 46114

fr/paris/lutece/plugins/folderlisting/business/FolderListingHome.java

Rule Violation Priority Line
UseUtilityClass 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. 3 55132
ShortVariable Avoid variables with short names like f 3 72
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 85
AddEmptyString Do not add empty strings 3 91
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 118

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortlet.java

Rule Violation Priority Line
CallSuperInConstructor It is a good practice to call super() in a constructor 3 7376
ConfusingTernary Avoid if (x != y) ..; else ..; 3 148155
ConfusingTernary Avoid if (x != y) ..; else ..; 3 170177
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 188225
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 275278
MissingOverride The method 'remove()' is missing an @Override annotation. 3 291294

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortletDAO.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO' 4 36
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 6268
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 7583
ShortVariable Avoid variables with short names like p 3 77
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 92109
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 116127
ShortVariable Avoid variables with short names like p 3 118
MissingOverride The method 'checkNoFolderInPortlet(int)' is missing an @Override annotation. 3 134149

fr/paris/lutece/plugins/folderlisting/business/portlet/FolderListingPortletHome.java

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

fr/paris/lutece/plugins/folderlisting/business/portlet/IFolderListingPortletDAO.java

Rule Violation Priority Line
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 50
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 56
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 63
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 69

fr/paris/lutece/plugins/folderlisting/service/Folder.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 41141
NonThreadSafeSingleton Singleton is not thread safe 3 5761
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 128131

fr/paris/lutece/plugins/folderlisting/service/FolderListingPlugin.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 3951
MissingOverride The method 'init()' is missing an @Override annotation. 3 4650

fr/paris/lutece/plugins/folderlisting/service/FolderLoaderDatabase.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 47114
DefaultPackage Use explicit scoping instead of the default package private level 3 50
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _plugin field if you want a default access modifier 3 50
MissingOverride The method 'getResources()' is missing an @Override annotation. 3 5672
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 3 7989

fr/paris/lutece/plugins/folderlisting/service/FolderLoaderProperties.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 53151
ImmutableField Private field '_strFolderFilesPath' could be made final; it is only initialized in the declaration or constructor. 3 62
MissingOverride The method 'getResources()' is missing an @Override annotation. 3 77102
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 3 109121
ShortVariable Avoid variables with short names like is 3 135
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 135

fr/paris/lutece/plugins/folderlisting/service/FolderService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 44139
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 44139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 119
MissingOverride The method 'getLoadersProperty()' is missing an @Override annotation. 3 135138

fr/paris/lutece/plugins/folderlisting/service/FolderWorkgroupRemovalListener.java

Rule Violation Priority Line
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 5573
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 8185

fr/paris/lutece/plugins/folderlisting/web/FolderListingDatabaseJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62331
ImmutableField Private field '_nDefaultItemsPerPage' could be made final; it is only initialized in the declaration or constructor. 3 102
CommentRequired Public method and constructor comments are required 3 104107
CallSuperInConstructor It is a good practice to call super() in a constructor 3 104107
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 118
AddEmptyString Do not add empty strings 3 153
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 269
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 271
AvoidReassigningParameters Avoid reassigning parameters such as 'strFolderPath' 2 302
AvoidReassigningParameters Avoid reassigning parameters such as 'strPath' 2 322
SimplifyStartsWith This call to String.startsWith can be rewritten using String.charAt(0) 3 324

fr/paris/lutece/plugins/folderlisting/web/FolderListingFileJspBean.java

Rule Violation Priority Line
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 7981
UncommentedEmptyConstructor Document empty constructor 3 7981
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strDirPath' 3 95
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1 105153
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 120
ShortVariable Avoid variables with short names like in 3 121
IdenticalCatchBranches 'catch' branch identical to 'FileNotFoundException' branch 3 144149
CommentRequired Public method and constructor comments are required 3 155189
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strUrl' 3 188
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strFileName' 3 202

fr/paris/lutece/plugins/folderlisting/web/portlet/FolderListingPortletJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 61280
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 3 90113
SystemPrintln System.out.println is used 2 93
SystemPrintln System.out.println is used 2 96
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 3 122142
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 3 161190
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 165
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 166
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 3 199230
DefaultPackage Use explicit scoping instead of the default package private level 3 240249
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getFolderIndexCombo method if you want a default access modifier 3 240249