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/portal/service/html/XmlTransformerService.java

Rule Violation Ligne
FieldNamingConventions The constant name '_log' doesn't match '[A-Z][A-Z_0-9]*' 60

fr/paris/lutece/util/xml/XmlTransformer.java

Rule Violation Ligne
FieldNamingConventions The constant name 'transformersPoolList' doesn't match '[A-Z][A-Z_0-9]*' 71

Priority 2

fr/paris/lutece/portal/web/style/StylesJspBean.java

Rule Violation Ligne
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 354–355

Priority 3

fr/paris/lutece/portal/business/portlet/PortletStyleXslDAO.java

Rule Violation Ligne
CommentRequired Header comments are required 40–113
MissingOverride The method 'selectStylesList(String)' is missing an @Override annotation. 65–81

fr/paris/lutece/portal/business/style/StyleDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(Style)' is missing an @Override annotation. 74–86
MissingOverride The method 'load(int)' is missing an @Override annotation. 95–118
MissingOverride The method 'delete(int)' is missing an @Override annotation. 126–133
MissingOverride The method 'store(Style)' is missing an @Override annotation. 141–153
MissingOverride The method 'selectStylesList()' is missing an @Override annotation. 160–184
MissingOverride The method 'selectPortalComponentList()' is missing an @Override annotation. 191–206
MissingOverride The method 'selectStyleSheetList(int)' is missing an @Override annotation. 215–238
MissingOverride The method 'checkStylePortalComponent(int)' is missing an @Override annotation. 247–264

fr/paris/lutece/portal/business/stylesheet/StyleSheet.java

Rule Violation Ligne
MethodReturnsInternalArray Returning '_strSource' may expose an internal array. 162
ArrayIsStoredDirectly The user-supplied array 'strSource' is stored directly. 171

fr/paris/lutece/portal/business/stylesheet/StyleSheetDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(StyleSheet)' is missing an @Override annotation. 72–92
MissingOverride The method 'load(int)' is missing an @Override annotation. 101–123
MissingOverride The method 'delete(int)' is missing an @Override annotation. 131–141
MissingOverride The method 'selectStyleSheetList(int)' is missing an @Override annotation. 150–189
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 162
MissingOverride The method 'store(StyleSheet)' is missing an @Override annotation. 197–212
MissingOverride The method 'selectStyleSheetNbPerStyleMode(int, int)' is missing an @Override annotation. 276–298
MissingOverride The method 'selectModeId(int)' is missing an @Override annotation. 307–327

fr/paris/lutece/portal/service/html/XmlTransformerCacheManager.java

Rule Violation Ligne
CommentRequired Header comments are required 5–20

fr/paris/lutece/portal/service/html/XmlTransformerService.java

Rule Violation Ligne
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 165
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 199

fr/paris/lutece/portal/service/portlet/PortletContentXslService.java

Rule Violation Ligne
CommentRequired Header comments are required 49–70
CommentRequired Public method and constructor comments are required 53–56
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 58
UselessStringValueOf No need to call String.valueOf to append to a string. 64

fr/paris/lutece/portal/web/style/StylesJspBean.java

Rule Violation Ligne
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 151
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 156
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 162
AddEmptyString Do not add empty strings 163
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 181
CyclomaticComplexity The method 'doCreateStyle(HttpServletRequest)' has a cyclomatic complexity of 10. 200–252
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 202
ConfusingTernary Avoid if (x != y) ..; else ..; 247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 266
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 288
ConfusingTernary Avoid if (x != y) ..; else ..; 292
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 294
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 335
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 350
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 359

fr/paris/lutece/portal/web/stylesheet/StyleSheetFileServlet.java

Rule Violation Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 86

fr/paris/lutece/portal/web/stylesheet/StyleSheetJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34–535
ConfusingTernary Avoid if (x != y) ..; else ..; 145
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 175
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 180
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 186
AddEmptyString Do not add empty strings 188
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 209
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 265
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 268
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 271
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 326
ConfusingTernary Avoid if (x != y) ..; else ..; 355
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 419
LinguisticNaming Linguistics Antipattern - The method 'isValid' indicates linguistically it returns a boolean, but it returns 'String' 468–489
ShortVariable Avoid variables with short names like is 479
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 482

fr/paris/lutece/util/xml/XmlTransformer.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like tf 102
ShortVariable Avoid variables with short names like tf 120
ShortVariable Avoid variables with short names like tf 161
CyclomaticComplexity The method 'getTemplates(Source, String)' has a cyclomatic complexity of 10. 194–236
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 224
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 227
ShortVariable Avoid variables with short names like sw 348
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 361
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 364

Priority 4

fr/paris/lutece/portal/web/stylesheet/StyleSheetJspBean.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'java.io.FileOutputStream' 38
UnusedImports Avoid unused imports such as 'java.io.IOException' 39

Fichiers

fr/paris/lutece/portal/business/portlet/PortletStyleXslDAO.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 40–113
MissingOverride The method 'selectStylesList(String)' is missing an @Override annotation. 3 65–81

fr/paris/lutece/portal/business/style/StyleDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(Style)' is missing an @Override annotation. 3 74–86
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 95–118
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 126–133
MissingOverride The method 'store(Style)' is missing an @Override annotation. 3 141–153
MissingOverride The method 'selectStylesList()' is missing an @Override annotation. 3 160–184
MissingOverride The method 'selectPortalComponentList()' is missing an @Override annotation. 3 191–206
MissingOverride The method 'selectStyleSheetList(int)' is missing an @Override annotation. 3 215–238
MissingOverride The method 'checkStylePortalComponent(int)' is missing an @Override annotation. 3 247–264

fr/paris/lutece/portal/business/stylesheet/StyleSheet.java

Rule Violation Priority Ligne
MethodReturnsInternalArray Returning '_strSource' may expose an internal array. 3 162
ArrayIsStoredDirectly The user-supplied array 'strSource' is stored directly. 3 171

fr/paris/lutece/portal/business/stylesheet/StyleSheetDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(StyleSheet)' is missing an @Override annotation. 3 72–92
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 101–123
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 131–141
MissingOverride The method 'selectStyleSheetList(int)' is missing an @Override annotation. 3 150–189
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 162
MissingOverride The method 'store(StyleSheet)' is missing an @Override annotation. 3 197–212
MissingOverride The method 'selectStyleSheetNbPerStyleMode(int, int)' is missing an @Override annotation. 3 276–298
MissingOverride The method 'selectModeId(int)' is missing an @Override annotation. 3 307–327

fr/paris/lutece/portal/service/html/XmlTransformerCacheManager.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 5–20

fr/paris/lutece/portal/service/html/XmlTransformerService.java

Rule Violation Priority Ligne
FieldNamingConventions The constant name '_log' doesn't match '[A-Z][A-Z_0-9]*' 1 60
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 165
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 199

fr/paris/lutece/portal/service/portlet/PortletContentXslService.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 49–70
CommentRequired Public method and constructor comments are required 3 53–56
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 58
UselessStringValueOf No need to call String.valueOf to append to a string. 3 64

fr/paris/lutece/portal/web/style/StylesJspBean.java

Rule Violation Priority Ligne
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 151
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 156
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 162
AddEmptyString Do not add empty strings 3 163
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 181
CyclomaticComplexity The method 'doCreateStyle(HttpServletRequest)' has a cyclomatic complexity of 10. 3 200–252
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 202
ConfusingTernary Avoid if (x != y) ..; else ..; 3 247
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 266
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 288
ConfusingTernary Avoid if (x != y) ..; else ..; 3 292
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 294
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 335
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 350
AvoidBranchingStatementAsLastInLoop Avoid using a branching statement as the last in a loop. 2 354–355
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 359

fr/paris/lutece/portal/web/stylesheet/StyleSheetFileServlet.java

Rule Violation Priority Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 3 86

fr/paris/lutece/portal/web/stylesheet/StyleSheetJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34–535
UnusedImports Avoid unused imports such as 'java.io.FileOutputStream' 4 38
UnusedImports Avoid unused imports such as 'java.io.IOException' 4 39
ConfusingTernary Avoid if (x != y) ..; else ..; 3 145
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 175
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 180
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 186
AddEmptyString Do not add empty strings 3 188
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 209
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 265
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 268
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 271
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 326
ConfusingTernary Avoid if (x != y) ..; else ..; 3 355
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 419
LinguisticNaming Linguistics Antipattern - The method 'isValid' indicates linguistically it returns a boolean, but it returns 'String' 3 468–489
ShortVariable Avoid variables with short names like is 3 479
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 482

fr/paris/lutece/util/xml/XmlTransformer.java

Rule Violation Priority Ligne
FieldNamingConventions The constant name 'transformersPoolList' doesn't match '[A-Z][A-Z_0-9]*' 1 71
ShortVariable Avoid variables with short names like tf 3 102
ShortVariable Avoid variables with short names like tf 3 120
ShortVariable Avoid variables with short names like tf 3 161
CyclomaticComplexity The method 'getTemplates(Source, String)' has a cyclomatic complexity of 10. 3 194–236
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 224
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 227
ShortVariable Avoid variables with short names like sw 3 348
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 361
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 364