Fork me on GitHub

PMD Results

The following document contains the results of PMD 6.13.0.

Violations By Priority

Priority 3

fr/paris/lutece/plugins/galleryimage/service/GalleryImageResourceIdService.java

Rule Violation Line
ShortVariable Avoid variables with short names like rt 66
ShortVariable Avoid variables with short names like p 73

fr/paris/lutece/plugins/galleryimage/service/GalleryResourceIdService.java

Rule Violation Line
ShortVariable Avoid variables with short names like rt 69
ShortVariable Avoid variables with short names like p 76

fr/paris/lutece/plugins/galleryimage/service/IImageService.java

Rule Violation Line
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'BEAN_NAME': the field is declared in an interface type 47

fr/paris/lutece/plugins/galleryimage/util/ImageUtils.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34306
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 105
ShortVariable Avoid variables with short names like os 122
CyclomaticComplexity The method 'safeImage(FileItem)' has a cyclomatic complexity of 22. 139291
ExcessiveMethodLength Avoid really long methods. 139291
NPathComplexity The method 'safeImage(FileItem)' has an NPath complexity of 290 139291
NcssCount The method 'safeImage(FileItem)' has a NCSS line count of 72. 139291
ConfusingTernary Avoid if (x != y) ..; else ..; 154172
ConfusingTernary Avoid if (x != y) ..; else ..; 157165
ConfusingTernary Avoid if (x != y) ..; else ..; 177184
ShortVariable Avoid variables with short names like bg 206
ConfusingTernary Avoid if (x != y) ..; else ..; 212276
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 284

fr/paris/lutece/plugins/galleryimage/web/ManageGalleryJspBean.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34409
CommentRequired Header comments are required 75409
CommentRequired Public method and constructor comments are required 131141
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 134
CommentRequired Public method and constructor comments are required 144159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 152
CommentRequired Public method and constructor comments are required 162186
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 164
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 165
CommentRequired Public method and constructor comments are required 189205
CommentRequired Public method and constructor comments are required 208224
CommentRequired Public method and constructor comments are required 227245
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 261
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 262
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 262
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 349
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 350
CommentRequired Public method and constructor comments are required 367381
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 369
ConfusingTernary Avoid if (x != y) ..; else ..; 397

fr/paris/lutece/plugins/galleryimage/web/ManageImageJspBean.java

Rule Violation Line
CommentRequired Header comments are required 64313
ImmutableField Private field '_imageService' could be made final; it is only initialized in the declaration or constructor. 94
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 115
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 137
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 138
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 154
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 186
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 240
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 241
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 242
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 259

fr/paris/lutece/plugins/galleryimage/web/servlet/GalleryImageServlet.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 109
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 138

Priority 4

fr/paris/lutece/plugins/galleryimage/business/ImageHome.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 41
UnusedImports Avoid unused imports such as 'com.google.common.collect.Lists' 45

fr/paris/lutece/plugins/galleryimage/web/ManageGalleryJspBean.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'com.rometools.rome.io.impl.Base64' 48
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.security.RsaService' 61

Files

fr/paris/lutece/plugins/galleryimage/business/ImageHome.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppPropertiesService' 4 41
UnusedImports Avoid unused imports such as 'com.google.common.collect.Lists' 4 45

fr/paris/lutece/plugins/galleryimage/service/GalleryImageResourceIdService.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like rt 3 66
ShortVariable Avoid variables with short names like p 3 73

fr/paris/lutece/plugins/galleryimage/service/GalleryResourceIdService.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like rt 3 69
ShortVariable Avoid variables with short names like p 3 76

fr/paris/lutece/plugins/galleryimage/service/IImageService.java

Rule Violation Priority Line
UnnecessaryModifier Unnecessary modifiers 'public static final' on field 'BEAN_NAME': the field is declared in an interface type 3 47

fr/paris/lutece/plugins/galleryimage/util/ImageUtils.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34306
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 105
ShortVariable Avoid variables with short names like os 3 122
CyclomaticComplexity The method 'safeImage(FileItem)' has a cyclomatic complexity of 22. 3 139291
ExcessiveMethodLength Avoid really long methods. 3 139291
NPathComplexity The method 'safeImage(FileItem)' has an NPath complexity of 290 3 139291
NcssCount The method 'safeImage(FileItem)' has a NCSS line count of 72. 3 139291
ConfusingTernary Avoid if (x != y) ..; else ..; 3 154172
ConfusingTernary Avoid if (x != y) ..; else ..; 3 157165
ConfusingTernary Avoid if (x != y) ..; else ..; 3 177184
ShortVariable Avoid variables with short names like bg 3 206
ConfusingTernary Avoid if (x != y) ..; else ..; 3 212276
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 284

fr/paris/lutece/plugins/galleryimage/web/ManageGalleryJspBean.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34409
UnusedImports Avoid unused imports such as 'com.rometools.rome.io.impl.Base64' 4 48
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.security.RsaService' 4 61
CommentRequired Header comments are required 3 75409
CommentRequired Public method and constructor comments are required 3 131141
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 134
CommentRequired Public method and constructor comments are required 3 144159
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 152
CommentRequired Public method and constructor comments are required 3 162186
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 164
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 165
CommentRequired Public method and constructor comments are required 3 189205
CommentRequired Public method and constructor comments are required 3 208224
CommentRequired Public method and constructor comments are required 3 227245
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 261
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 262
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 262
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 349
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 350
CommentRequired Public method and constructor comments are required 3 367381
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 369
ConfusingTernary Avoid if (x != y) ..; else ..; 3 397

fr/paris/lutece/plugins/galleryimage/web/ManageImageJspBean.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 64313
ImmutableField Private field '_imageService' could be made final; it is only initialized in the declaration or constructor. 3 94
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 115
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 137
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 138
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 154
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 186
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 213
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 240
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 241
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 242
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 259

fr/paris/lutece/plugins/galleryimage/web/servlet/GalleryImageServlet.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 109
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 138