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/mydashboard/modules/nickname/web/MyDashboardNicknameApp.java

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

Priority 2

fr/paris/lutece/plugins/mydashboard/business/portlet/MyDashboardPortletHome.java

Rule Violation Line
AvoidUsingVolatile Use of modifier volatile is not recommended. 47

Priority 3

fr/paris/lutece/plugins/mydashboard/business/MyDashboardConfiguration.java

Rule Violation Line
ShortVariable Avoid variables with short names like o 133
ConfusingTernary Avoid if (x != y) ..; else ..; 135
ShortVariable Avoid variables with short names like o 142
SimplifiedTernary Ternary operators that can be simplified with || or && 144–146
ConfusingTernary Avoid if (x != y) ..; else ..; 155

fr/paris/lutece/plugins/mydashboard/business/MyDashboardConfigurationDAO.java

Rule Violation Line
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 55

fr/paris/lutece/plugins/mydashboard/business/Panel.java

Rule Violation Line
CommentRequired Public method and constructor comments are required 134–137
CommentRequired Public method and constructor comments are required 139–142

fr/paris/lutece/plugins/mydashboard/business/PanelHome.java

Rule Violation Line
ConfusingTernary Avoid if (x != y) ..; else ..; 184
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 184

fr/paris/lutece/plugins/mydashboard/business/portlet/MyDashboardPortlet.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 91
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 91
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 116

fr/paris/lutece/plugins/mydashboard/business/portlet/MyDashboardPortletHome.java

Rule Violation Line
ImmutableField Private field '_dao' could be made final; it is only initialized in the declaration or constructor. 48
NonThreadSafeSingleton Singleton is not thread safe 56–62
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 85

fr/paris/lutece/plugins/mydashboard/modules/nickname/service/MyDashboardComponentNickname.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 81
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 81

fr/paris/lutece/plugins/mydashboard/modules/nickname/web/MyDashboardNicknameApp.java

Rule Violation Line
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 50–79

fr/paris/lutece/plugins/mydashboard/service/MyDashboardComponent.java

Rule Violation Line
ShortVariable Avoid variables with short names like o 71
ConfusingTernary Avoid if (x != y) ..; else ..; 73

fr/paris/lutece/plugins/mydashboard/service/MyDashboardComponentMyDashboard.java

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

fr/paris/lutece/plugins/mydashboard/service/MyDashboardService.java

Rule Violation Line
GodClass Possible God Class (WMC=65, ATFD=62, TCC=14.167%) 62–544
ImmutableField Private field '_myDashboardComponentDAO' could be made final; it is only initialized in the declaration or constructor. 68
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 129
ConfusingTernary Avoid if (x != y) ..; else ..; 131–160
NcssCount The method 'getUserConfig(LuteceUser)' has a NCSS line count of 66. 207–331
CyclomaticComplexity The method 'getUserConfig(LuteceUser)' has a cyclomatic complexity of 17. 207–331
ExcessiveMethodLength Avoid really long methods. 207–331
NPathComplexity The method 'getUserConfig(LuteceUser)' has an NPath complexity of 1376 207–331
CommentRequired Public method and constructor comments are required 333–336
CyclomaticComplexity The method 'getDashboardComponentListFromUser(LuteceUser, Panel)' has a cyclomatic complexity of 10. 360–425
ConfusingTernary Avoid if (x != y) ..; else ..; 401–402
ConfusingTernary Avoid if (x != y) ..; else ..; 488–489
ConfusingTernary Avoid if (x != y) ..; else ..; 506–507

fr/paris/lutece/plugins/mydashboard/web/ManageMydashboardPanelJspBean.java

Rule Violation Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 131
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 152
ConfusingTernary Avoid if (x != y) ..; else ..; 183
AddEmptyString Do not add empty strings 514

fr/paris/lutece/plugins/mydashboard/web/MyDashboardApp.java

Rule Violation Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 137
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 172
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 176
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 176
CyclomaticComplexity The method 'doMoveDashboard(HttpServletRequest)' has a cyclomatic complexity of 13. 237–308
ConfusingTernary Avoid if (x != y) ..; else ..; 297–304

fr/paris/lutece/plugins/mydashboard/web/portlet/MyDashboardPortletJspBean.java

Rule Violation Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 92–93
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 94–95
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 146–147

Priority 4

fr/paris/lutece/plugins/mydashboard/business/MyDashboardConfiguration.java

Rule Violation Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 114–117

Files

fr/paris/lutece/plugins/mydashboard/business/MyDashboardConfiguration.java

Rule Violation Priority Line
BooleanGetMethodName A getX() method which returns a boolean should be named isX() 4 114–117
ShortVariable Avoid variables with short names like o 3 133
ConfusingTernary Avoid if (x != y) ..; else ..; 3 135
ShortVariable Avoid variables with short names like o 3 142
SimplifiedTernary Ternary operators that can be simplified with || or && 3 144–146
ConfusingTernary Avoid if (x != y) ..; else ..; 3 155

fr/paris/lutece/plugins/mydashboard/business/MyDashboardConfigurationDAO.java

Rule Violation Priority Line
UseUnderscoresInNumericLiterals Number 1000000 should separate every third digit with an underscore 3 55

fr/paris/lutece/plugins/mydashboard/business/Panel.java

Rule Violation Priority Line
CommentRequired Public method and constructor comments are required 3 134–137
CommentRequired Public method and constructor comments are required 3 139–142

fr/paris/lutece/plugins/mydashboard/business/PanelHome.java

Rule Violation Priority Line
ConfusingTernary Avoid if (x != y) ..; else ..; 3 184
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 184

fr/paris/lutece/plugins/mydashboard/business/portlet/MyDashboardPortlet.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 91
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 91
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 116

fr/paris/lutece/plugins/mydashboard/business/portlet/MyDashboardPortletHome.java

Rule Violation Priority Line
AvoidUsingVolatile Use of modifier volatile is not recommended. 2 47
ImmutableField Private field '_dao' could be made final; it is only initialized in the declaration or constructor. 3 48
NonThreadSafeSingleton Singleton is not thread safe 3 56–62
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'strPortletTypeId' 3 85

fr/paris/lutece/plugins/mydashboard/modules/nickname/service/MyDashboardComponentNickname.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 81
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 81

fr/paris/lutece/plugins/mydashboard/modules/nickname/web/MyDashboardNicknameApp.java

Rule Violation Priority Line
ClassNamingConventions The utility class name 'MyDashboardNicknameApp' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 49–79
UseUtilityClass All methods are static. Consider using a utility class instead. Alternatively, you could add a private constructor or make the class abstract to silence this warning. 3 50–79

fr/paris/lutece/plugins/mydashboard/service/MyDashboardComponent.java

Rule Violation Priority Line
ShortVariable Avoid variables with short names like o 3 71
ConfusingTernary Avoid if (x != y) ..; else ..; 3 73

fr/paris/lutece/plugins/mydashboard/service/MyDashboardComponentMyDashboard.java

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

fr/paris/lutece/plugins/mydashboard/service/MyDashboardService.java

Rule Violation Priority Line
GodClass Possible God Class (WMC=65, ATFD=62, TCC=14.167%) 3 62–544
ImmutableField Private field '_myDashboardComponentDAO' could be made final; it is only initialized in the declaration or constructor. 3 68
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 129
ConfusingTernary Avoid if (x != y) ..; else ..; 3 131–160
NcssCount The method 'getUserConfig(LuteceUser)' has a NCSS line count of 66. 3 207–331
CyclomaticComplexity The method 'getUserConfig(LuteceUser)' has a cyclomatic complexity of 17. 3 207–331
ExcessiveMethodLength Avoid really long methods. 3 207–331
NPathComplexity The method 'getUserConfig(LuteceUser)' has an NPath complexity of 1376 3 207–331
CommentRequired Public method and constructor comments are required 3 333–336
CyclomaticComplexity The method 'getDashboardComponentListFromUser(LuteceUser, Panel)' has a cyclomatic complexity of 10. 3 360–425
ConfusingTernary Avoid if (x != y) ..; else ..; 3 401–402
ConfusingTernary Avoid if (x != y) ..; else ..; 3 488–489
ConfusingTernary Avoid if (x != y) ..; else ..; 3 506–507

fr/paris/lutece/plugins/mydashboard/web/ManageMydashboardPanelJspBean.java

Rule Violation Priority Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 131
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 143
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 152
ConfusingTernary Avoid if (x != y) ..; else ..; 3 183
AddEmptyString Do not add empty strings 3 514

fr/paris/lutece/plugins/mydashboard/web/MyDashboardApp.java

Rule Violation Priority Line
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 110
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 137
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 172
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 172
UseConcurrentHashMap If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 3 176
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 176
CyclomaticComplexity The method 'doMoveDashboard(HttpServletRequest)' has a cyclomatic complexity of 13. 3 237–308
ConfusingTernary Avoid if (x != y) ..; else ..; 3 297–304

fr/paris/lutece/plugins/mydashboard/web/portlet/MyDashboardPortletJspBean.java

Rule Violation Priority Line
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 92–93
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 94–95
PrematureDeclaration Avoid declaring a variable if it is unreferenced before a possible exit point. 3 146–147