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/jasper/service/CompiledJasperTemplateCacheService.java

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

fr/paris/lutece/plugins/jasper/service/FileTypeContext.java

Rule Violation Line
FieldNamingConventions The field name 'strategy' doesn't match '_[a-z][a-zA-Z0-9]*' 45

fr/paris/lutece/plugins/jasper/service/JasperFileLinkService.java

Rule Violation Line
FieldNamingConventions The field name 'mapStrategies' doesn't match '_[a-z][a-zA-Z0-9]*' 68

fr/paris/lutece/plugins/jasper/service/purge/ImagePurgeService.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 46–84

fr/paris/lutece/plugins/jasper/web/JasperJspBean.java

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

Priority 3

fr/paris/lutece/plugins/jasper/business/JasperReport.java

Rule Violation Line
ImmutableField Private field '_listFileFormats' could be made final; it is only initialized in the declaration or constructor. 50
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 50
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 50
CommentRequired Public method and constructor comments are required 94–97
CommentRequired Public method and constructor comments are required 99–102
CommentRequired Public method and constructor comments are required 125–128
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 179
CommentRequired Public method and constructor comments are required 187–190
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 187

fr/paris/lutece/plugins/jasper/business/JasperReportDAO.java

Rule Violation Line
MissingOverride The method 'insert(JasperReport, Plugin)' is missing an @Override annotation. 92–105
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 116–139
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 150
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 152
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 176–183
MissingOverride The method 'store(JasperReport, Plugin)' is missing an @Override annotation. 193–203
MissingOverride The method 'selectJasperReportsList(Plugin)' is missing an @Override annotation. 212–234
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 214
CommentRequired Public method and constructor comments are required 236–256
MissingOverride The method 'loadByCode(String, Plugin)' is missing an @Override annotation. 236–256

fr/paris/lutece/plugins/jasper/business/portlet/IJasperPortletDAO.java

Rule Violation Line
CommentRequired Header comments are required 39–82
MissingOverride The method 'delete(int)' is missing an @Override annotation. 47
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 55
MissingOverride The method 'load(int)' is missing an @Override annotation. 64
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 72

fr/paris/lutece/plugins/jasper/business/portlet/JasperPortlet.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 56–59
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 89–92
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 101–110
MissingOverride The method 'remove()' is missing an @Override annotation. 123–126

fr/paris/lutece/plugins/jasper/business/portlet/JasperPortletDAO.java

Rule Violation Line
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 61–71
ShortVariable Avoid variables with short names like p 65
MissingOverride The method 'delete(int)' is missing an @Override annotation. 79–86
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 94–106
ShortVariable Avoid variables with short names like p 98
MissingOverride The method 'load(int)' is missing an @Override annotation. 115–132
MissingOverride The method 'checkNoPortletLinked(int)' is missing an @Override annotation. 141–157

fr/paris/lutece/plugins/jasper/business/portlet/JasperPortletHome.java

Rule Violation Line
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 50
CallSuperInConstructor It is a good practice to call super() in a constructor 55–61
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 68–74
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 73
NonThreadSafeSingleton Singleton is not thread safe 83–86
MissingOverride The method 'getDAO()' is missing an @Override annotation. 96–99

fr/paris/lutece/plugins/jasper/service/CompiledJasperTemplateCacheService.java

Rule Violation Line
CallSuperInConstructor It is a good practice to call super() in a constructor 57–60
MissingOverride The method 'getName()' is missing an @Override annotation. 67–70
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 73
NonThreadSafeSingleton Singleton is not thread safe 82–85
ShortVariable Avoid variables with short names like r 105
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 124

fr/paris/lutece/plugins/jasper/service/DownloadFileServlet.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 54–57
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 54–57
ConfusingTernary Avoid if (x != y) ..; else ..; 84
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 89
MissingOverride The method 'doGet(HttpServletRequest, HttpServletResponse)' is missing an @Override annotation. 111–114
MissingOverride The method 'doPost(HttpServletRequest, HttpServletResponse)' is missing an @Override annotation. 128–131
MissingOverride The method 'getServletInfo()' is missing an @Override annotation. 138–141

fr/paris/lutece/plugins/jasper/service/ExportFormatService.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 59
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 59
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 83
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 96
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 102–111
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 106–110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 119
CommentRequired Public method and constructor comments are required 134–138

fr/paris/lutece/plugins/jasper/service/FileTypeContext.java

Rule Violation Line
CommentRequired Header comments are required 43–91
ImmutableField Private field 'strategy' could be made final; it is only initialized in the declaration or constructor. 45
CommentRequired Public method and constructor comments are required 48–51
CommentRequired Public method and constructor comments are required 53–56
CommentRequired Public method and constructor comments are required 58–61
CommentRequired Public method and constructor comments are required 63–67
CommentRequired Public method and constructor comments are required 69–72
CommentRequired Public method and constructor comments are required 74–79
CommentRequired Public method and constructor comments are required 81–85
CommentRequired Public method and constructor comments are required 87–90

fr/paris/lutece/plugins/jasper/service/JasperConnectionService.java

Rule Violation Line
LooseCoupling Avoid using implementation types like 'Hashtable'; use the interface instead 48
ReplaceHashtableWithMap Consider replacing this Hashtable with the newer java.util.Map 48
ConfusingTernary Avoid if (x != y) ..; else ..; 68–83

fr/paris/lutece/plugins/jasper/service/JasperFileLinkService.java

Rule Violation Line
CommentRequired Enum comments are required 52–251
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 68
CommentRequired Public method and constructor comments are required 70–79
CommentRequired Public method and constructor comments are required 110–114
CommentRequired Public method and constructor comments are required 116–125
CommentRequired Public method and constructor comments are required 127–131
CommentRequired Public method and constructor comments are required 133–142
CommentRequired Public method and constructor comments are required 144–149
CommentRequired Public method and constructor comments are required 151–161
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 192
ShortVariable Avoid variables with short names like i 193
CommentRequired Public method and constructor comments are required 207–222
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 209
ShortVariable Avoid variables with short names like i 210
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 246

fr/paris/lutece/plugins/jasper/service/export/AbstractDefaultJasperRender.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 121
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 214
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 228

fr/paris/lutece/plugins/jasper/service/export/HtmlJasperRender.java

Rule Violation Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 84–94
ShortVariable Avoid variables with short names like sb 116

fr/paris/lutece/plugins/jasper/service/purge/DaemonPurgeJasperImage.java

Rule Violation Line
CommentRequired Header comments are required 38–44
CommentRequired Public method and constructor comments are required 40–43
MissingOverride The method 'run()' is missing an @Override annotation. 40–43

fr/paris/lutece/plugins/jasper/service/purge/ImagePurgeService.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 54–63
CommentRequired Public method and constructor comments are required 65–83
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 71–79

fr/paris/lutece/plugins/jasper/web/JasperApp.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 51–124
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 58
CallSuperInConstructor It is a good practice to call super() in a constructor 63–70
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 84–117
CommentRequired Public method and constructor comments are required 119–122
MissingOverride The method 'getName()' is missing an @Override annotation. 119–122

fr/paris/lutece/plugins/jasper/web/JasperJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 71–394
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 116
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 140
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 140
AddEmptyString Do not add empty strings 142
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 162
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 162
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 183
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 184
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 267
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 285
CyclomaticComplexity The method 'localTemplateFile(JasperReport, FileItem, String, boolean)' has a cyclomatic complexity of 11. 314–373
ConfusingTernary Avoid if (x != y) ..; else ..; 319–372
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 334
AvoidRethrowingException A catch statement that catches an exception only to rethrow it should be avoided. 358–361
ControlStatementBraces This statement should have braces 365
CommentRequired Public method and constructor comments are required 375–393
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 381–389

fr/paris/lutece/plugins/jasper/web/JasperLinkServiceJspBean.java

Rule Violation Line
CommentRequired Header comments are required 57–124
MissingOverride The method 'getInsertServiceSelectorUI(HttpServletRequest)' is missing an @Override annotation. 71–101
CommentRequired Public method and constructor comments are required 71–101
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 75
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 117
UnusedLocalVariable Avoid unused local variables such as 'locale'. 117

fr/paris/lutece/plugins/jasper/web/portlet/JasperPortletJspBean.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 51–222
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 91–101
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 110–123
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 132–157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 138
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 139
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 166–190
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getFeedIndexCombo method if you want a default access modifier 201–210
DefaultPackage Use explicit scoping instead of the default package private level 201–210
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 203
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 203
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getDummyList method if you want a default access modifier 213–221
DefaultPackage Use explicit scoping instead of the default package private level 213–221

Priority 4

fr/paris/lutece/plugins/jasper/service/JasperFileLinkService.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 48

fr/paris/lutece/plugins/jasper/web/JasperLinkServiceJspBean.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Map' 53

Files

fr/paris/lutece/plugins/jasper/business/JasperReport.java

Rule Violation Priority Line
ImmutableField Private field '_listFileFormats' could be made final; it is only initialized in the declaration or constructor. 3 50
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 50
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 50
CommentRequired Public method and constructor comments are required 3 94–97
CommentRequired Public method and constructor comments are required 3 99–102
CommentRequired Public method and constructor comments are required 3 125–128
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 179
CommentRequired Public method and constructor comments are required 3 187–190
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 187

fr/paris/lutece/plugins/jasper/business/JasperReportDAO.java

Rule Violation Priority Line
MissingOverride The method 'insert(JasperReport, Plugin)' is missing an @Override annotation. 3 92–105
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 116–139
LooseCoupling Avoid using implementation types like 'ArrayList'; use the interface instead 3 150
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 152
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 176–183
MissingOverride The method 'store(JasperReport, Plugin)' is missing an @Override annotation. 3 193–203
MissingOverride The method 'selectJasperReportsList(Plugin)' is missing an @Override annotation. 3 212–234
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 214
CommentRequired Public method and constructor comments are required 3 236–256
MissingOverride The method 'loadByCode(String, Plugin)' is missing an @Override annotation. 3 236–256

fr/paris/lutece/plugins/jasper/business/portlet/IJasperPortletDAO.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 39–82
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 47
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 55
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 64
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 72

fr/paris/lutece/plugins/jasper/business/portlet/JasperPortlet.java

Rule Violation Priority Line
CallSuperInConstructor It is a good practice to call super() in a constructor 3 56–59
MissingOverride The method 'getXmlDocument(HttpServletRequest)' is missing an @Override annotation. 3 89–92
MissingOverride The method 'getXml(HttpServletRequest)' is missing an @Override annotation. 3 101–110
MissingOverride The method 'remove()' is missing an @Override annotation. 3 123–126

fr/paris/lutece/plugins/jasper/business/portlet/JasperPortletDAO.java

Rule Violation Priority Line
MissingOverride The method 'insert(Portlet)' is missing an @Override annotation. 3 61–71
ShortVariable Avoid variables with short names like p 3 65
MissingOverride The method 'delete(int)' is missing an @Override annotation. 3 79–86
MissingOverride The method 'store(Portlet)' is missing an @Override annotation. 3 94–106
ShortVariable Avoid variables with short names like p 3 98
MissingOverride The method 'load(int)' is missing an @Override annotation. 3 115–132
MissingOverride The method 'checkNoPortletLinked(int)' is missing an @Override annotation. 3 141–157

fr/paris/lutece/plugins/jasper/business/portlet/JasperPortletHome.java

Rule Violation Priority Line
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 50
CallSuperInConstructor It is a good practice to call super() in a constructor 3 55–61
MissingOverride The method 'getPortletTypeId()' is missing an @Override annotation. 3 68–74
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 3 73
NonThreadSafeSingleton Singleton is not thread safe 3 83–86
MissingOverride The method 'getDAO()' is missing an @Override annotation. 3 96–99

fr/paris/lutece/plugins/jasper/service/CompiledJasperTemplateCacheService.java

Rule Violation Priority Line
CallSuperInConstructor It is a good practice to call super() in a constructor 3 57–60
MissingOverride The method 'getName()' is missing an @Override annotation. 3 67–70
FieldDeclarationsShouldBeAtStartOfClass Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. 3 73
NonThreadSafeSingleton Singleton is not thread safe 3 82–85
ShortVariable Avoid variables with short names like r 3 105
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 108
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 124

fr/paris/lutece/plugins/jasper/service/DownloadFileServlet.java

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 54–57
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 54–57
ConfusingTernary Avoid if (x != y) ..; else ..; 3 84
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 89
MissingOverride The method 'doGet(HttpServletRequest, HttpServletResponse)' is missing an @Override annotation. 3 111–114
MissingOverride The method 'doPost(HttpServletRequest, HttpServletResponse)' is missing an @Override annotation. 3 128–131
MissingOverride The method 'getServletInfo()' is missing an @Override annotation. 3 138–141

fr/paris/lutece/plugins/jasper/service/ExportFormatService.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 59
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 59
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 83
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 96
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 102–111
AvoidDeeplyNestedIfStmts Deeply nested if..then statements are hard to read 3 106–110
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 119
CommentRequired Public method and constructor comments are required 3 134–138

fr/paris/lutece/plugins/jasper/service/FileTypeContext.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 43–91
ImmutableField Private field 'strategy' could be made final; it is only initialized in the declaration or constructor. 3 45
FieldNamingConventions The field name 'strategy' doesn't match '_[a-z][a-zA-Z0-9]*' 1 45
CommentRequired Public method and constructor comments are required 3 48–51
CommentRequired Public method and constructor comments are required 3 53–56
CommentRequired Public method and constructor comments are required 3 58–61
CommentRequired Public method and constructor comments are required 3 63–67
CommentRequired Public method and constructor comments are required 3 69–72
CommentRequired Public method and constructor comments are required 3 74–79
CommentRequired Public method and constructor comments are required 3 81–85
CommentRequired Public method and constructor comments are required 3 87–90

fr/paris/lutece/plugins/jasper/service/JasperConnectionService.java

Rule Violation Priority Line
LooseCoupling Avoid using implementation types like 'Hashtable'; use the interface instead 3 48
ReplaceHashtableWithMap Consider replacing this Hashtable with the newer java.util.Map 3 48
ConfusingTernary Avoid if (x != y) ..; else ..; 3 68–83

fr/paris/lutece/plugins/jasper/service/JasperFileLinkService.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 4 48
CommentRequired Enum comments are required 3 52–251
LooseCoupling Avoid using implementation types like 'HashMap'; use the interface instead 3 68
FieldNamingConventions The field name 'mapStrategies' doesn't match '_[a-z][a-zA-Z0-9]*' 1 68
CommentRequired Public method and constructor comments are required 3 70–79
CommentRequired Public method and constructor comments are required 3 110–114
CommentRequired Public method and constructor comments are required 3 116–125
CommentRequired Public method and constructor comments are required 3 127–131
CommentRequired Public method and constructor comments are required 3 133–142
CommentRequired Public method and constructor comments are required 3 144–149
CommentRequired Public method and constructor comments are required 3 151–161
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 3 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 192
ShortVariable Avoid variables with short names like i 3 193
CommentRequired Public method and constructor comments are required 3 207–222
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 209
ShortVariable Avoid variables with short names like i 3 210
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 246

fr/paris/lutece/plugins/jasper/service/export/AbstractDefaultJasperRender.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 121
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 121
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 214
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 228

fr/paris/lutece/plugins/jasper/service/export/HtmlJasperRender.java

Rule Violation Priority Line
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 84–94
ShortVariable Avoid variables with short names like sb 3 116

fr/paris/lutece/plugins/jasper/service/purge/DaemonPurgeJasperImage.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 38–44
CommentRequired Public method and constructor comments are required 3 40–43
MissingOverride The method 'run()' is missing an @Override annotation. 3 40–43

fr/paris/lutece/plugins/jasper/service/purge/ImagePurgeService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 46–84
CommentRequired Public method and constructor comments are required 3 54–63
CommentRequired Public method and constructor comments are required 3 65–83
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 71–79

fr/paris/lutece/plugins/jasper/web/JasperApp.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 51–124
AssignmentToNonFinalStatic Possible unsafe assignment to a non-final static field in a constructor. 3 58
CallSuperInConstructor It is a good practice to call super() in a constructor 3 63–70
MissingOverride The method 'getPage(HttpServletRequest, int, Plugin)' is missing an @Override annotation. 3 84–117
CommentRequired Public method and constructor comments are required 3 119–122
MissingOverride The method 'getName()' is missing an @Override annotation. 3 119–122

fr/paris/lutece/plugins/jasper/web/JasperJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 71–394
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 116
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 140
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 140
AddEmptyString Do not add empty strings 3 142
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 162
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 162
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 183
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 184
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 267
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 267
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 285
CyclomaticComplexity The method 'localTemplateFile(JasperReport, FileItem, String, boolean)' has a cyclomatic complexity of 11. 3 314–373
ConfusingTernary Avoid if (x != y) ..; else ..; 3 319–372
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 334
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 353
AvoidRethrowingException A catch statement that catches an exception only to rethrow it should be avoided. 3 358–361
ControlStatementBraces This statement should have braces 3 365
CommentRequired Public method and constructor comments are required 3 375–393
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 381–389

fr/paris/lutece/plugins/jasper/web/JasperLinkServiceJspBean.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Map' 4 53
CommentRequired Header comments are required 3 57–124
MissingOverride The method 'getInsertServiceSelectorUI(HttpServletRequest)' is missing an @Override annotation. 3 71–101
CommentRequired Public method and constructor comments are required 3 71–101
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 75
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 117
UnusedLocalVariable Avoid unused local variables such as 'locale'. 3 117

fr/paris/lutece/plugins/jasper/web/portlet/JasperPortletJspBean.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 51–222
MissingOverride The method 'getCreate(HttpServletRequest)' is missing an @Override annotation. 3 91–101
MissingOverride The method 'getModify(HttpServletRequest)' is missing an @Override annotation. 3 110–123
MissingOverride The method 'doCreate(HttpServletRequest)' is missing an @Override annotation. 3 132–157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 138
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 139
MissingOverride The method 'doModify(HttpServletRequest)' is missing an @Override annotation. 3 166–190
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getFeedIndexCombo method if you want a default access modifier 3 201–210
DefaultPackage Use explicit scoping instead of the default package private level 3 201–210
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 203
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 203
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the getDummyList method if you want a default access modifier 3 213–221
DefaultPackage Use explicit scoping instead of the default package private level 3 213–221