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/folderlisting/service/FolderLoaderProperties.java

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

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

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 44–139

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

Rule Violation Ligne
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 105–153
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 120

Priority 2

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

Rule Violation Ligne
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 Ligne
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 Ligne
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 115–118

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

Rule Violation Ligne
MissingOverride The method 'insert(FolderListingDatabase, Plugin)' is missing an @Override annotation. 87–98
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 106–126
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 133–139
MissingOverride The method 'store(FolderListingDatabase, Plugin)' is missing an @Override annotation. 146–157
MissingOverride The method 'selectFolderListingDatabaseList(Plugin)' is missing an @Override annotation. 164–184

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

Rule Violation Ligne
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. 46–114

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

Rule Violation Ligne
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. 55–132
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 Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 73–76
ConfusingTernary Avoid if (x != y) ..; else ..; 148–155
ConfusingTernary Avoid if (x != y) ..; else ..; 170–177
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 188–225
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 275–278
MissingOverride The method 'remove()' is missing an @Override annotation. 291–294

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

Rule Violation Ligne
MissingOverride The method 'delete(int)' is missing an @Override annotation. 62–68
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 75–83
ShortVariable Avoid variables with short names like p 77
MissingOverride The method 'load(int)' is missing an @Override annotation. 92–109
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 116–127
ShortVariable Avoid variables with short names like p 118
MissingOverride The method 'checkNoFolderInPortlet(int)' is missing an @Override annotation. 134–149

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

Rule Violation Ligne
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 57–63
NonThreadSafeSingleton Singleton is not thread safe 72–75
MissingOverride The method 'getDAO()' is missing an @Override annotation. 85–88
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 95–101
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 Ligne
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 Ligne
CommentRequired Header comments are required 41–141
NonThreadSafeSingleton Singleton is not thread safe 57–61
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 128–131

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

Rule Violation Ligne
CommentRequired Header comments are required 39–51
MissingOverride The method 'init()' is missing an @Override annotation. 46–50

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

Rule Violation Ligne
CommentRequired Header comments are required 47–114
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. 56–72
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 79–89

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

Rule Violation Ligne
CommentRequired Header comments are required 53–151
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. 77–102
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 109–121
ShortVariable Avoid variables with short names like is 135

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

Rule Violation Ligne
CommentRequired Header comments are required 44–139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 119
MissingOverride The method 'getLoadersProperty()' is missing an @Override annotation. 135–138

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

Rule Violation Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 55–73
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 81–85

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

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 62–331
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 104–107
CallSuperInConstructor It is a good practice to call super() in a constructor 104–107
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 Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 79–81
UncommentedEmptyConstructor Document empty constructor 79–81
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 144–149
CommentRequired Public method and constructor comments are required 155–189
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 Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 61–280
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 90–113
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 122–142
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 161–190
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. 199–230
DefaultPackage Use explicit scoping instead of the default package private level 240–249
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getFolderIndexCombo method if you want a default access modifier 240–249

Priority 4

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

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

Fichiers

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

Rule Violation Priority Ligne
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 115–118

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

Rule Violation Priority Ligne
MissingOverride The method 'insert(FolderListingDatabase, Plugin)' is missing an @Override annotation. 3 87–98
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 106–126
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 133–139
MissingOverride The method 'store(FolderListingDatabase, Plugin)' is missing an @Override annotation. 3 146–157
MissingOverride The method 'selectFolderListingDatabaseList(Plugin)' is missing an @Override annotation. 3 164–184

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

Rule Violation Priority Ligne
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 46–114

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

Rule Violation Priority Ligne
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 55–132
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 Ligne
CallSuperInConstructor It is a good practice to call super() in a constructor 3 73–76
ConfusingTernary Avoid if (x != y) ..; else ..; 3 148–155
ConfusingTernary Avoid if (x != y) ..; else ..; 3 170–177
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 188–225
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 275–278
MissingOverride The method 'remove()' is missing an @Override annotation. 3 291–294

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

Rule Violation Priority Ligne
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 62–68
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 75–83
ShortVariable Avoid variables with short names like p 3 77
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 92–109
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 116–127
ShortVariable Avoid variables with short names like p 3 118
MissingOverride The method 'checkNoFolderInPortlet(int)' is missing an @Override annotation. 3 134–149

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

Rule Violation Priority Ligne
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 57–63
NonThreadSafeSingleton Singleton is not thread safe 3 72–75
MissingOverride The method 'getDAO()' is missing an @Override annotation. 3 85–88
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 3 95–101
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 Ligne
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 Ligne
CommentRequired Header comments are required 3 41–141
NonThreadSafeSingleton Singleton is not thread safe 3 57–61
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 128–131

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 39–51
MissingOverride The method 'init()' is missing an @Override annotation. 3 46–50

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 47–114
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 56–72
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 3 79–89

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

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 53–151
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 77–102
MissingOverride The method 'getResource(String)' is missing an @Override annotation. 3 109–121
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 Ligne
CommentRequired Header comments are required 3 44–139
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 44–139
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 119
MissingOverride The method 'getLoadersProperty()' is missing an @Override annotation. 3 135–138

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

Rule Violation Priority Ligne
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 55–73
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 81–85

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

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 62–331
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 104–107
CallSuperInConstructor It is a good practice to call super() in a constructor 3 104–107
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 Ligne
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 79–81
UncommentedEmptyConstructor Document empty constructor 3 79–81
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strDirPath' 3 95
ReturnEmptyArrayRatherThanNull Return an empty array rather than null. 1 105–153
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 144–149
CommentRequired Public method and constructor comments are required 3 155–189
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 Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 61–280
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 3 90–113
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 122–142
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 3 161–190
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 199–230
DefaultPackage Use explicit scoping instead of the default package private level 3 240–249
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getFolderIndexCombo method if you want a default access modifier 3 240–249