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/stock/modules/recommendation/service/FilePurchaseDataWriter.java

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

Priority 3

fr/paris/lutece/plugins/stock/modules/recommendation/business/AvailableProductsDAO.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 65
LinguisticNaming Linguistics Antipattern - The getter 'getProductInfos' should not return void linguistically 89101

fr/paris/lutece/plugins/stock/modules/recommendation/business/RecommendationDAO.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 104

fr/paris/lutece/plugins/stock/modules/recommendation/business/StockPurchaseDAO.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 58
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 86

fr/paris/lutece/plugins/stock/modules/recommendation/service/BuildRecommendationsDaemon.java

Rule Violation Line
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 21 characters appended. 48

fr/paris/lutece/plugins/stock/modules/recommendation/service/FilePurchaseDataWriter.java

Rule Violation Line
ImmutableField Private field '_file' could be made final; it is only initialized in the declaration or constructor. 49

fr/paris/lutece/plugins/stock/modules/recommendation/service/StockRecommendationService.java

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34360
NonThreadSafeSingleton Singleton is not thread safe 105136
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 123
IdenticalCatchBranches 'catch' branch identical to 'FileNotFoundException' branch 131134
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listAvailableProducts' 299
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 329
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 329
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 330

fr/paris/lutece/plugins/stock/modules/recommendation/web/RecommendationApp.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 58137

fr/paris/lutece/plugins/stock/modules/recommendation/web/RecommendationPageInclude.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 71

Files

fr/paris/lutece/plugins/stock/modules/recommendation/business/AvailableProductsDAO.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 65
LinguisticNaming Linguistics Antipattern - The getter 'getProductInfos' should not return void linguistically 3 89101

fr/paris/lutece/plugins/stock/modules/recommendation/business/RecommendationDAO.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 104

fr/paris/lutece/plugins/stock/modules/recommendation/business/StockPurchaseDAO.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 58
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 86

fr/paris/lutece/plugins/stock/modules/recommendation/service/BuildRecommendationsDaemon.java

Rule Violation Priority Line
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 21 characters appended. 3 48

fr/paris/lutece/plugins/stock/modules/recommendation/service/FilePurchaseDataWriter.java

Rule Violation Priority Line
ImmutableField Private field '_file' could be made final; it is only initialized in the declaration or constructor. 3 49
AvoidFileStream Avoid instantiating FileInputStream, FileOutputStream, FileReader, or FileWriter 1 70

fr/paris/lutece/plugins/stock/modules/recommendation/service/StockRecommendationService.java

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34360
NonThreadSafeSingleton Singleton is not thread safe 3 105136
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 123
IdenticalCatchBranches 'catch' branch identical to 'FileNotFoundException' branch 3 131134
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listAvailableProducts' 3 299
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 329
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 329
ConsecutiveLiteralAppends StringBuffer (or StringBuilder).append is called 2 consecutive times with literals. Use a single append with a single combined String. 3 330

fr/paris/lutece/plugins/stock/modules/recommendation/web/RecommendationApp.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 58137

fr/paris/lutece/plugins/stock/modules/recommendation/web/RecommendationPageInclude.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 71