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/blobstore/business/filesystem/FileSystemBlobStoreDAO.java

Rule Violation Line
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 197
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 248
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 274

fr/paris/lutece/plugins/blobstore/util/BlobStoreConstants.java

Rule Violation Line
ClassNamingConventions The utility class name 'BlobStoreConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 41–55

Priority 3

fr/paris/lutece/plugins/blobstore/business/database/DatabaseBlobStoreDAO.java

Rule Violation Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 86–95
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 163

fr/paris/lutece/plugins/blobstore/business/filesystem/FileSystemBlobStoreDAO.java

Rule Violation Line
ShortVariable Avoid variables with short names like in 198
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 200–208
ShortVariable Avoid variables with short names like in 275
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 277–285

fr/paris/lutece/plugins/blobstore/service/BlobStoreFileStorageService.java

Rule Violation Line
ImmutableField Private field '_blobStoreService' could be made final; it is only initialized in the declaration or constructor. 74
CommentRequired Public method and constructor comments are required 275–278

fr/paris/lutece/plugins/blobstore/service/BlobStorePlugin.java

Rule Violation Line
MissingOverride The method 'init()' is missing an @Override annotation. 50–52
UncommentedEmptyMethodBody Document empty method body 51–52

fr/paris/lutece/plugins/blobstore/service/database/DatabaseBlobStoreService.java

Rule Violation Line
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strMetadataKey' 230

fr/paris/lutece/plugins/blobstore/service/download/JSPBlobStoreDownloadUrlService.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 101–127
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 105
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 112
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 126

fr/paris/lutece/plugins/blobstore/service/filesystem/FileSystemBlobStoreService.java

Rule Violation Line
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strMetadataKey' 294
CommentRequired Public method and constructor comments are required 394–397
CommentRequired Public method and constructor comments are required 399–402

fr/paris/lutece/plugins/blobstore/web/BlobStoreJspBean.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 90–127
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 160
ConfusingTernary Avoid if (x != y) ..; else ..; 165–198
ShortVariable Avoid variables with short names like is 172
ConfusingTernary Avoid if (x != y) ..; else ..; 174–186
ShortVariable Avoid variables with short names like os 218
ShortVariable Avoid variables with short names like is 219
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 221–255
ConfusingTernary Avoid if (x != y) ..; else ..; 228–235

Files

fr/paris/lutece/plugins/blobstore/business/database/DatabaseBlobStoreDAO.java

Rule Violation Priority Line
AvoidSynchronizedAtMethodLevel Use block level rather than method level synchronization 3 86–95
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 163

fr/paris/lutece/plugins/blobstore/business/filesystem/FileSystemBlobStoreDAO.java

Rule Violation Priority Line
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 197
ShortVariable Avoid variables with short names like in 3 198
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 3 200–208
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 248
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 274
ShortVariable Avoid variables with short names like in 3 275
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 3 277–285

fr/paris/lutece/plugins/blobstore/service/BlobStoreFileStorageService.java

Rule Violation Priority Line
ImmutableField Private field '_blobStoreService' could be made final; it is only initialized in the declaration or constructor. 3 74
CommentRequired Public method and constructor comments are required 3 275–278

fr/paris/lutece/plugins/blobstore/service/BlobStorePlugin.java

Rule Violation Priority Line
MissingOverride The method 'init()' is missing an @Override annotation. 3 50–52
UncommentedEmptyMethodBody Document empty method body 3 51–52

fr/paris/lutece/plugins/blobstore/service/database/DatabaseBlobStoreService.java

Rule Violation Priority Line
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strMetadataKey' 3 230

fr/paris/lutece/plugins/blobstore/service/download/JSPBlobStoreDownloadUrlService.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 101–127
UseStringBufferForStringAppends Prefer StringBuilder (non-synchronized) or StringBuffer (synchronized) over += for concatenating strings 3 105
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 112
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 126

fr/paris/lutece/plugins/blobstore/service/filesystem/FileSystemBlobStoreService.java

Rule Violation Priority Line
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strMetadataKey' 3 294
CommentRequired Public method and constructor comments are required 3 394–397
CommentRequired Public method and constructor comments are required 3 399–402

fr/paris/lutece/plugins/blobstore/util/BlobStoreConstants.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'BlobStoreConstants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 41–55

fr/paris/lutece/plugins/blobstore/web/BlobStoreJspBean.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 90–127
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 160
ConfusingTernary Avoid if (x != y) ..; else ..; 3 165–198
ShortVariable Avoid variables with short names like is 3 172
ConfusingTernary Avoid if (x != y) ..; else ..; 3 174–186
ShortVariable Avoid variables with short names like os 3 218
ShortVariable Avoid variables with short names like is 3 219
UseTryWithResources Consider using a try-with-resources statement instead of explicitly closing the resource 3 221–255
ConfusingTernary Avoid if (x != y) ..; else ..; 3 228–235