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/fileexport/business/FileExportDAO.java

Rule Violation Ligne
LocalVariableNamingConventions The final local variable name 'BUF_SIZE' doesn't match '[a-z][a-zA-Z0-9]*' 286
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 295
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 354

Priority 2

fr/paris/lutece/plugins/fileexport/business/FileExportDAO.java

Rule Violation Ligne
SystemPrintln System.out.println is used 271

Priority 3

fr/paris/lutece/plugins/fileexport/business/FileExportDAO.java

Rule Violation Ligne
MissingOverride The method 'insert(FileExport, Plugin)' is missing an @Override annotation. 111126
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 138159
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 170175
MissingOverride The method 'store(FileExport, Plugin)' is missing an @Override annotation. 186200
MissingOverride The method 'selectFileExportsList(Plugin)' is missing an @Override annotation. 210231
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 211
CommentRequired Public method and constructor comments are required 233248
SimplifyBooleanExpressions Avoid unnecessary comparisons in boolean expressions 241
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 250251
CommentRequired Public method and constructor comments are required 250321
CloseResource Ensure that resources like this Connection object are closed after use 254
CloseResource Ensure that resources like this ResultSet object are closed after use 265
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 279
UnusedLocalVariable Avoid unused local variables such as 'f'. 282
ShortVariable Avoid variables with short names like f 282
AssignmentInOperand Avoid assignments in operands 289
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 300
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 307
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 314315
CommentRequired Public method and constructor comments are required 343364
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 348361
ShortVariable Avoid variables with short names like f 349
AssignmentInOperand Avoid assignments in operands 357
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 362
EmptyCatchBlock Avoid empty catch blocks 362363

fr/paris/lutece/plugins/fileexport/service/FileExportConnectionService.java

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

fr/paris/lutece/plugins/fileexport/service/FileZipService.java

Rule Violation Ligne
UnusedPrivateField Avoid unused private fields such as 'PARAM_PLUGIN_ID'. 58
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 6472
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 84

fr/paris/lutece/plugins/fileexport/web/FileexportJspBean.java

Rule Violation Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 63319
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 113
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 136
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 136
AddEmptyString Do not add empty strings 138
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 157
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 261
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 261
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 278

Priority 4

fr/paris/lutece/plugins/fileexport/business/FileExportDAO.java

Rule Violation Ligne
DoNotThrowExceptionInFinally A throw statement in a finally block makes the control flow hard to understand. 308319

fr/paris/lutece/plugins/fileexport/service/FileZipService.java

Rule Violation Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 37
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 38
UnusedImports Avoid unused imports such as 'java.io.ByteArrayInputStream' 40
UnusedImports Avoid unused imports such as 'java.util.HashMap' 43
UnusedImports Avoid unused imports such as 'java.util.Map' 44
UnusedImports Avoid unused imports such as 'java.util.zip.ZipEntry' 45
UnusedImports Avoid unused imports such as 'javax.servlet.http.HttpSession' 49

Fichiers

fr/paris/lutece/plugins/fileexport/business/FileExportDAO.java

Rule Violation Priority Ligne
MissingOverride The method 'insert(FileExport, Plugin)' is missing an @Override annotation. 3 111126
MissingOverride The method 'load(int, Plugin)' is missing an @Override annotation. 3 138159
MissingOverride The method 'delete(int, Plugin)' is missing an @Override annotation. 3 170175
MissingOverride The method 'store(FileExport, Plugin)' is missing an @Override annotation. 3 186200
MissingOverride The method 'selectFileExportsList(Plugin)' is missing an @Override annotation. 3 210231
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 211
CommentRequired Public method and constructor comments are required 3 233248
SimplifyBooleanExpressions Avoid unnecessary comparisons in boolean expressions 3 241
UseObjectForClearerAPI Rather than using a lot of String arguments, consider using a container object for those values. 3 250251
CommentRequired Public method and constructor comments are required 3 250321
CloseResource Ensure that resources like this Connection object are closed after use 3 254
CloseResource Ensure that resources like this ResultSet object are closed after use 3 265
SystemPrintln System.out.println is used 2 271
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 279
UnusedLocalVariable Avoid unused local variables such as 'f'. 3 282
ShortVariable Avoid variables with short names like f 3 282
LocalVariableNamingConventions The final local variable name 'BUF_SIZE' doesn't match '[a-z][a-zA-Z0-9]*' 1 286
AssignmentInOperand Avoid assignments in operands 3 289
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 295
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 300
AvoidPrintStackTrace Avoid printStackTrace(); use a logger call instead. 3 307
DoNotThrowExceptionInFinally A throw statement in a finally block makes the control flow hard to understand. 4 308319
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 314315
CommentRequired Public method and constructor comments are required 3 343364
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 348361
ShortVariable Avoid variables with short names like f 3 349
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 354
AssignmentInOperand Avoid assignments in operands 3 357
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 362
EmptyCatchBlock Avoid empty catch blocks 3 362363

fr/paris/lutece/plugins/fileexport/service/FileExportConnectionService.java

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

fr/paris/lutece/plugins/fileexport/service/FileZipService.java

Rule Violation Priority Ligne
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' 4 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.PluginService' 4 37
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 4 38
UnusedImports Avoid unused imports such as 'java.io.ByteArrayInputStream' 4 40
UnusedImports Avoid unused imports such as 'java.util.HashMap' 4 43
UnusedImports Avoid unused imports such as 'java.util.Map' 4 44
UnusedImports Avoid unused imports such as 'java.util.zip.ZipEntry' 4 45
UnusedImports Avoid unused imports such as 'javax.servlet.http.HttpSession' 4 49
UnusedPrivateField Avoid unused private fields such as 'PARAM_PLUGIN_ID'. 3 58
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 6472
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 84

fr/paris/lutece/plugins/fileexport/web/FileexportJspBean.java

Rule Violation Priority Ligne
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 63319
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 113
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 136
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 136
AddEmptyString Do not add empty strings 3 138
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 157
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 157
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 261
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 261
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 278