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/grafana/service/DashboardService.java

Rule Violation Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 63280

fr/paris/lutece/plugins/grafana/utils/constants/GrafanaConstants.java

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

Priority 3

fr/paris/lutece/plugins/grafana/business/DashboardDAO.java

Rule Violation Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 167
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 195
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 269

fr/paris/lutece/plugins/grafana/service/DashboardIdService.java

Rule Violation Line
CommentRequired Header comments are required 4793
ShortVariable Avoid variables with short names like rt 58
ShortVariable Avoid variables with short names like p 64

fr/paris/lutece/plugins/grafana/service/DashboardService.java

Rule Violation Line
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 79
CommentRequired Public method and constructor comments are required 8794
NonThreadSafeSingleton Singleton is not thread safe 8992
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 107
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 109
ConfusingTernary Avoid if (x != y) ..; else ..; 124131
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 138
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 142
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 255

fr/paris/lutece/plugins/grafana/service/GrafanaPlugin.java

Rule Violation Line
UncommentedEmptyMethodBody Document empty method body 5859

fr/paris/lutece/plugins/grafana/service/NoGrafanaDashboardException.java

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

fr/paris/lutece/plugins/grafana/service/NoGrafanaServerException.java

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

fr/paris/lutece/plugins/grafana/web/DashboardJspBean.java

Rule Violation Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 105
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 137

fr/paris/lutece/plugins/grafana/web/GrafanaDashboardJspBean.java

Rule Violation Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 103
ConfusingTernary Avoid if (x != y) ..; else ..; 175186

fr/paris/lutece/plugins/grafana/web/ManageGrafanaJspBean.java

Rule Violation Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 68
AddEmptyString Do not add empty strings 99

Files

fr/paris/lutece/plugins/grafana/business/DashboardDAO.java

Rule Violation Priority Line
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 167
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 195
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 269

fr/paris/lutece/plugins/grafana/service/DashboardIdService.java

Rule Violation Priority Line
CommentRequired Header comments are required 3 4793
ShortVariable Avoid variables with short names like rt 3 58
ShortVariable Avoid variables with short names like p 3 64

fr/paris/lutece/plugins/grafana/service/DashboardService.java

Rule Violation Priority Line
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 63280
RedundantFieldInitializer Avoid using redundant field initializer for '_instance' 3 79
CommentRequired Public method and constructor comments are required 3 8794
NonThreadSafeSingleton Singleton is not thread safe 3 8992
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 107
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 109
ConfusingTernary Avoid if (x != y) ..; else ..; 3 124131
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 138
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 142
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 157
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 255

fr/paris/lutece/plugins/grafana/service/GrafanaPlugin.java

Rule Violation Priority Line
UncommentedEmptyMethodBody Document empty method body 3 5859

fr/paris/lutece/plugins/grafana/service/NoGrafanaDashboardException.java

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

fr/paris/lutece/plugins/grafana/service/NoGrafanaServerException.java

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

fr/paris/lutece/plugins/grafana/utils/constants/GrafanaConstants.java

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

fr/paris/lutece/plugins/grafana/web/DashboardJspBean.java

Rule Violation Priority Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 105
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 137

fr/paris/lutece/plugins/grafana/web/GrafanaDashboardJspBean.java

Rule Violation Priority Line
UnnecessaryAnnotationValueElement Avoid the use of value in annotations when its the only element 3 103
ConfusingTernary Avoid if (x != y) ..; else ..; 3 175186

fr/paris/lutece/plugins/grafana/web/ManageGrafanaJspBean.java

Rule Violation Priority Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 68
AddEmptyString Do not add empty strings 3 99