Le document suivant contient les résultats de PMD 6.13.0.
Rule | Violation | Ligne |
---|---|---|
ClassNamingConventions | The utility class name 'MyDashboardNicknameApp' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 49–79 |
Rule | Violation | Ligne |
---|---|---|
AvoidUsingVolatile | Use of modifier volatile is not recommended. | 47 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
UseUnderscoresInNumericLiterals | Number 1000000 should separate every third digit with an underscore | 55 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Public method and constructor comments are required | 134–137 |
CommentRequired | Public method and constructor comments are required | 139–142 |
Rule | Violation | Ligne |
---|---|---|
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 184 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 184 |
Rule | Violation | Ligne |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 91 |
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 | 116 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 81 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 81 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
ShortVariable | Avoid variables with short names like o | 71 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 73 |
Rule | Violation | Ligne |
---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 66 |
Rule | Violation | Ligne |
---|---|---|
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 |
NPathComplexity | The method 'getUserConfig(LuteceUser)' has an NPath complexity of 1376 | 207–331 |
NcssCount | The method 'getUserConfig(LuteceUser)' has a NCSS line count of 66. | 207–331 |
ExcessiveMethodLength | Avoid really long methods. | 207–331 |
CyclomaticComplexity | The method 'getUserConfig(LuteceUser)' has a cyclomatic complexity of 17. | 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 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 110 |
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 | 137 |
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 | 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 |
Rule | Violation | Ligne |
---|---|---|
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 |
Rule | Violation | Ligne |
---|---|---|
BooleanGetMethodName | A getX() method which returns a boolean should be named isX() | 114–117 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseUnderscoresInNumericLiterals | Number 1000000 should separate every third digit with an underscore | 3 | 55 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Public method and constructor comments are required | 3 | 134–137 |
CommentRequired | Public method and constructor comments are required | 3 | 139–142 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 184 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 184 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 91 |
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 | 116 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 81 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 81 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ShortVariable | Avoid variables with short names like o | 3 | 71 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 73 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 66 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
NPathComplexity | The method 'getUserConfig(LuteceUser)' has an NPath complexity of 1376 | 3 | 207–331 |
NcssCount | The method 'getUserConfig(LuteceUser)' has a NCSS line count of 66. | 3 | 207–331 |
ExcessiveMethodLength | Avoid really long methods. | 3 | 207–331 |
CyclomaticComplexity | The method 'getUserConfig(LuteceUser)' has a cyclomatic complexity of 17. | 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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 110 |
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 | 137 |
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 | 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 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
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 |