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/htmlpage/business/HtmlPageHome.java

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

fr/paris/lutece/plugins/htmlpage/service/EnumStatus.java

Rule Violation Line
FieldNamingConventions The enum constant name 'disabled' doesn't match '[A-Z][A-Z_0-9]*' 45
FieldNamingConventions The enum constant name 'enabled' doesn't match '[A-Z][A-Z_0-9]*' 46
FieldNamingConventions The enum constant name 'conditioned' doesn't match '[A-Z][A-Z_0-9]*' 47

fr/paris/lutece/plugins/htmlpage/service/PublicHtmlPageCacheService.java

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

Priority 3

fr/paris/lutece/plugins/htmlpage/business/HtmlPage.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 6870
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 6870
NonThreadSafeSingleton Singleton is not thread safe 7882
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 220223

fr/paris/lutece/plugins/htmlpage/business/HtmlPageDAO.java

Rule Violation Line
MissingOverride The method 'insert(HtmlPage, Plugin)' is missing an @Override annotation. 100116
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 127151
MissingOverride The method 'delete(HtmlPage, Plugin)' is missing an @Override annotation. 161168
MissingOverride The method 'store(HtmlPage, Plugin)' is missing an @Override annotation. 178196
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 205229
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 207
MissingOverride The method 'selectEnabledHtmlPage(int, Plugin)' is missing an @Override annotation. 240264
MissingOverride The method 'selectEnabledHtmlPageList(Plugin)' is missing an @Override annotation. 273296
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 275

fr/paris/lutece/plugins/htmlpage/service/EnumStatus.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'EnumStatus(int, String)': enum constructors are implicitly private 5761

fr/paris/lutece/plugins/htmlpage/service/HtmlPagePlugin.java

Rule Violation Line
MissingOverride The method 'init()' is missing an @Override annotation. 6063
CommentRequired Public method and constructor comments are required 6568

fr/paris/lutece/plugins/htmlpage/service/HtmlPageService.java

Rule Violation Line
NonThreadSafeSingleton Singleton is not thread safe 6770

fr/paris/lutece/plugins/htmlpage/service/HtmlPageWorkgroupRemovalListener.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 8789
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 8789
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 98117
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 128132

fr/paris/lutece/plugins/htmlpage/service/IHtmlPageService.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getHtmlPageCache': the method is declared in an interface type 19
UnnecessaryModifier Unnecessary modifier 'public' on method 'getEnableHtmlPage': the method is declared in an interface type 26
UnnecessaryModifier Unnecessary modifier 'public' on method 'getHtmlPageListCache': the method is declared in an interface type 32
UnnecessaryModifier Unnecessary modifier 'public' on method 'getEnabledHtmlPageList': the method is declared in an interface type 38

fr/paris/lutece/plugins/htmlpage/service/PublicHtmlPageCacheService.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 5457
NonThreadSafeSingleton Singleton is not thread safe 6669
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 131

fr/paris/lutece/plugins/htmlpage/service/search/HtmlPageIndexer.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34307
MissingOverride The method 'getDescription()' is missing an @Override annotation. 9396
MissingOverride The method 'indexDocuments()' is missing an @Override annotation. 108124
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 133162
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 135
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 151
MissingOverride The method 'getName()' is missing an @Override annotation. 167170
MissingOverride The method 'getVersion()' is missing an @Override annotation. 175178
MissingOverride The method 'isEnable()' is missing an @Override annotation. 183195
UnusedFormalParameter Avoid unused method parameters such as 'plugin'. 215
ShortVariable Avoid variables with short names like ft 217
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 245
IdenticalCatchBranches 'catch' branch identical to 'SAXException' branch 247250
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 249
ShortVariable Avoid variables with short names like sb 254
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 280
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 282
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 282
MissingOverride The method 'getListType()' is missing an @Override annotation. 292298
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 294
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 303306

fr/paris/lutece/plugins/htmlpage/service/search/HtmlPageSearchEngine.java

Rule Violation Line
MissingOverride The method 'getSearchResults(String, HttpServletRequest)' is missing an @Override annotation. 80120
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 82
ShortVariable Avoid variables with short names like ir 85
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 106112
ShortVariable Avoid variables with short names like si 110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 114
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 131

fr/paris/lutece/plugins/htmlpage/utils/HtmlPageIndexerUtils.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. 4678

fr/paris/lutece/plugins/htmlpage/utils/HtmlPageUtil.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. 54133
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 122

fr/paris/lutece/plugins/htmlpage/web/HtmlPageApp.java

Rule Violation Line
UncommentedEmptyConstructor Document empty constructor 103105
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 103105
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 120151
UnusedFormalParameter Avoid unused method parameters such as 'strPluginName'. 153
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 158
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 168
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 199
ConfusingTernary Avoid if (x != y) ..; else ..; 204219

fr/paris/lutece/plugins/htmlpage/web/HtmlPageInclude.java

Rule Violation Line
MissingOverride The method 'fillTemplate(Map, PageData, int, HttpServletRequest)' is missing an @Override annotation. 7486

fr/paris/lutece/plugins/htmlpage/web/HtmlPageJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 68381
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 122
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 147
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 147
AddEmptyString Do not add empty strings 148
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 168
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 168
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 193
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 194
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 195
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 196
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 216
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 278
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 321

Priority 4

fr/paris/lutece/plugins/htmlpage/service/search/HtmlPageIndexer.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.htmlpage.business.HtmlPageHome' 37
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 121
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 135
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 146
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 225
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 225

Files

fr/paris/lutece/plugins/htmlpage/business/HtmlPage.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 6870
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 6870
NonThreadSafeSingleton Singleton is not thread safe 3 7882
MissingOverride The method 'getWorkgroup()' is missing an @Override annotation. 3 220223

fr/paris/lutece/plugins/htmlpage/business/HtmlPageDAO.java

Rule Violation Priority Line
MissingOverride The method 'insert(HtmlPage, Plugin)' is missing an @Override annotation. 3 100116
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 127151
MissingOverride The method 'delete(HtmlPage, Plugin)' is missing an @Override annotation. 3 161168
MissingOverride The method 'store(HtmlPage, Plugin)' is missing an @Override annotation. 3 178196
MissingOverride The method 'selectAll(Plugin)' is missing an @Override annotation. 3 205229
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 207
MissingOverride The method 'selectEnabledHtmlPage(int, Plugin)' is missing an @Override annotation. 3 240264
MissingOverride The method 'selectEnabledHtmlPageList(Plugin)' is missing an @Override annotation. 3 273296
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 275

fr/paris/lutece/plugins/htmlpage/business/HtmlPageHome.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 52202

fr/paris/lutece/plugins/htmlpage/service/EnumStatus.java

Rule Violation Priority Line
FieldNamingConventions The enum constant name 'disabled' doesn't match '[A-Z][A-Z_0-9]*' 1 45
FieldNamingConventions The enum constant name 'enabled' doesn't match '[A-Z][A-Z_0-9]*' 1 46
FieldNamingConventions The enum constant name 'conditioned' doesn't match '[A-Z][A-Z_0-9]*' 1 47
UnnecessaryModifier Unnecessary modifier 'private' on constructor 'EnumStatus(int, String)': enum constructors are implicitly private 3 5761

fr/paris/lutece/plugins/htmlpage/service/HtmlPagePlugin.java

Rule Violation Priority Line
MissingOverride The method 'init()' is missing an @Override annotation. 3 6063
CommentRequired Public method and constructor comments are required 3 6568

fr/paris/lutece/plugins/htmlpage/service/HtmlPageService.java

Rule Violation Priority Line
NonThreadSafeSingleton Singleton is not thread safe 3 6770

fr/paris/lutece/plugins/htmlpage/service/HtmlPageWorkgroupRemovalListener.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 8789
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 8789
MissingOverride The method 'canBeRemoved(String)' is missing an @Override annotation. 3 98117
MissingOverride The method 'getRemovalRefusedMessage(String, Locale)' is missing an @Override annotation. 3 128132

fr/paris/lutece/plugins/htmlpage/service/IHtmlPageService.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifier 'public' on method 'getHtmlPageCache': the method is declared in an interface type 3 19
UnnecessaryModifier Unnecessary modifier 'public' on method 'getEnableHtmlPage': the method is declared in an interface type 3 26
UnnecessaryModifier Unnecessary modifier 'public' on method 'getHtmlPageListCache': the method is declared in an interface type 3 32
UnnecessaryModifier Unnecessary modifier 'public' on method 'getEnabledHtmlPageList': the method is declared in an interface type 3 38

fr/paris/lutece/plugins/htmlpage/service/PublicHtmlPageCacheService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 46134
CallSuperInConstructor It is a good practice to call super() in a constructor 3 5457
NonThreadSafeSingleton Singleton is not thread safe 3 6669
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 131

fr/paris/lutece/plugins/htmlpage/service/search/HtmlPageIndexer.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34307
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.htmlpage.business.HtmlPageHome' 4 37
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 9396
MissingOverride The method 'indexDocuments()' is missing an @Override annotation. 3 108124
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 121
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 3 133162
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 135
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 135
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 146
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 151
MissingOverride The method 'getName()' is missing an @Override annotation. 3 167170
MissingOverride The method 'getVersion()' is missing an @Override annotation. 3 175178
MissingOverride The method 'isEnable()' is missing an @Override annotation. 3 183195
UnusedFormalParameter Avoid unused method parameters such as 'plugin'. 3 215
ShortVariable Avoid variables with short names like ft 3 217
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 225
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 225
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 245
IdenticalCatchBranches 'catch' branch identical to 'SAXException' branch 3 247250
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 249
ShortVariable Avoid variables with short names like sb 3 254
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 280
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 282
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 282
MissingOverride The method 'getListType()' is missing an @Override annotation. 3 292298
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 294
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 3 303306

fr/paris/lutece/plugins/htmlpage/service/search/HtmlPageSearchEngine.java

Rule Violation Priority Line
MissingOverride The method 'getSearchResults(String, HttpServletRequest)' is missing an @Override annotation. 3 80120
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 82
ShortVariable Avoid variables with short names like ir 3 85
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 106112
ShortVariable Avoid variables with short names like si 3 110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 114
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 131

fr/paris/lutece/plugins/htmlpage/utils/HtmlPageIndexerUtils.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 4678

fr/paris/lutece/plugins/htmlpage/utils/HtmlPageUtil.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 54133
SimpleDateFormatNeedsLocale When instantiating a SimpleDateFormat object, specify a Locale 3 122

fr/paris/lutece/plugins/htmlpage/web/HtmlPageApp.java

Rule Violation Priority Line
UncommentedEmptyConstructor Document empty constructor 3 103105
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 103105
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 3 120151
UnusedFormalParameter Avoid unused method parameters such as 'strPluginName'. 3 153
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 158
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 168
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 171
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 199
ConfusingTernary Avoid if (x != y) ..; else ..; 3 204219

fr/paris/lutece/plugins/htmlpage/web/HtmlPageInclude.java

Rule Violation Priority Line
MissingOverride The method 'fillTemplate(Map, PageData, int, HttpServletRequest)' is missing an @Override annotation. 3 7486

fr/paris/lutece/plugins/htmlpage/web/HtmlPageJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 68381
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 122
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 147
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 147
AddEmptyString Do not add empty strings 3 148
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 168
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 168
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 193
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 194
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 195
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 196
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 216
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 278
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 278
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 321