Le document suivant contient les résultats de PMD 6.13.0.
Rule | Violation | Ligne |
---|---|---|
FieldNamingConventions | The field name 'MESSAGE_KEY_PROJECT_RESOURCE_TYPE_DESCRIPTION' doesn't match '_[a-z][a-zA-Z0-9]*' | 48 |
Rule | Violation | Ligne |
---|---|---|
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _hit field if you want a default access modifier | 47 |
DefaultPackage | Use explicit scoping instead of the default package private level | 47 |
Rule | Violation | Ligne |
---|---|---|
SingularField | Perhaps '_locale' could be replaced by a local variable. | 57 |
UnusedPrivateField | Avoid unused private fields such as '_locale'. | 57 |
Rule | Violation | Ligne |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 164 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 192 |
Rule | Violation | Ligne |
---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 54–57 |
MissingOverride | The method 'getName()' is missing an @Override annotation. | 75–78 |
ShortVariable | Avoid variables with short names like r | 92 |
InsufficientStringBufferDeclaration | StringBuffer constructor is initialized with size 16, but has at least 23 characters appended. | 111 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 114–121 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 122 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 46–108 |
ImmutableField | Private field 'MESSAGE_KEY_PROJECT_RESOURCE_TYPE_DESCRIPTION' could be made final; it is only initialized in the declaration or constructor. | 48 |
ShortVariable | Avoid variables with short names like s | 91 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 's' | 92 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'strUrl' | 106 |
Rule | Violation | Ligne |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 49–102 |
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 65 |
AddEmptyString | Do not add empty strings | 96 |
Rule | Violation | Ligne |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 54–268 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 110 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 127 |
Rule | Violation | Ligne |
---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 57–260 |
CommentRequired | Public method and constructor comments are required | 101–108 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 103 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 120 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 64–166 |
ImmutableField | Private field '_mapper' could be made final; it is only initialized in the declaration or constructor. | 66 |
DefaultPackage | Use explicit scoping instead of the default package private level | 67 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the LOGGER field if you want a default access modifier | 67 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 102 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 132 |
ShortVariable | Avoid variables with short names like hs | 148 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.io.Serializable' | 42 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.web.resource.ExtendableResourcePluginActionManager' | 48 |
Rule | Violation | Ligne |
---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.HashMap' | 37 |
UnusedImports | Avoid unused imports such as 'java.util.Map' | 38 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _hit field if you want a default access modifier | 3 | 47 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 47 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.io.Serializable' | 4 | 42 |
SingularField | Perhaps '_locale' could be replaced by a local variable. | 3 | 57 |
UnusedPrivateField | Avoid unused private fields such as '_locale'. | 3 | 57 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 164 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 192 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CallSuperInConstructor | It is a good practice to call super() in a constructor | 3 | 54–57 |
MissingOverride | The method 'getName()' is missing an @Override annotation. | 3 | 75–78 |
ShortVariable | Avoid variables with short names like r | 3 | 92 |
InsufficientStringBufferDeclaration | StringBuffer constructor is initialized with size 16, but has at least 23 characters appended. | 3 | 111 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 114–121 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 122 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 46–108 |
ImmutableField | Private field 'MESSAGE_KEY_PROJECT_RESOURCE_TYPE_DESCRIPTION' could be made final; it is only initialized in the declaration or constructor. | 3 | 48 |
FieldNamingConventions | The field name 'MESSAGE_KEY_PROJECT_RESOURCE_TYPE_DESCRIPTION' doesn't match '_[a-z][a-zA-Z0-9]*' | 1 | 48 |
ShortVariable | Avoid variables with short names like s | 3 | 91 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 's' | 3 | 92 |
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'strUrl' | 3 | 106 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 49–102 |
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 3 | 65 |
AddEmptyString | Do not add empty strings | 3 | 96 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 54–268 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 110 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 127 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'fr.paris.lutece.portal.web.resource.ExtendableResourcePluginActionManager' | 4 | 48 |
MissingSerialVersionUID | Classes implementing Serializable should set a serialVersionUID | 3 | 57–260 |
CommentRequired | Public method and constructor comments are required | 3 | 101–108 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 103 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 120 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnusedImports | Avoid unused imports such as 'java.util.HashMap' | 4 | 37 |
UnusedImports | Avoid unused imports such as 'java.util.Map' | 4 | 38 |
CommentRequired | Header comments are required | 3 | 64–166 |
ImmutableField | Private field '_mapper' could be made final; it is only initialized in the declaration or constructor. | 3 | 66 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 67 |
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the LOGGER field if you want a default access modifier | 3 | 67 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 102 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 132 |
ShortVariable | Avoid variables with short names like hs | 3 | 148 |