Le document suivant contient les résultats de PMD 6.13.0.
Rule | Violation | Ligne |
---|---|---|
ClassNamingConventions | The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 39–58 |
Rule | Violation | Ligne |
---|---|---|
FieldNamingConventions | The final field name '_logger' doesn't match '[a-z][a-zA-Z0-9]*' | 64 |
Rule | Violation | Ligne |
---|---|---|
ClassNamingConventions | The utility class name 'LocalUserSearchEngine' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 63–112 |
Rule | Violation | Ligne |
---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 45–83 |
Rule | Violation | Ligne |
---|---|---|
LoggerIsNotStaticFinal | The Logger variable declaration does not contain the static and final modifiers | 64 |
Rule | Violation | Ligne |
---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 132 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 154 |
Rule | Violation | Ligne |
---|---|---|
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'listLocalUser' | 153 |
Rule | Violation | Ligne |
---|---|---|
ShortVariable | Avoid variables with short names like ID | 45 |
Rule | Violation | Ligne |
---|---|---|
UnusedPrivateField | Avoid unused private fields such as 'BEAN_SEARCH_ENGINE'. | 65 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 41–84 |
CommentRequired | Public method and constructor comments are required | 53–56 |
NonThreadSafeSingleton | Singleton is not thread safe | 65–68 |
Rule | Violation | Ligne |
---|---|---|
CommentRequired | Header comments are required | 47–92 |
CommentRequired | Public method and constructor comments are required | 59–62 |
NonThreadSafeSingleton | Singleton is not thread safe | 71–74 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 81 |
Rule | Violation | Ligne |
---|---|---|
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _pluginName field if you want a default access modifier | 76 |
DefaultPackage | Use explicit scoping instead of the default package private level | 76 |
MissingOverride | The method 'indexDocuments()' is missing an @Override annotation. | 88–101 |
MissingOverride | The method 'getDocuments(String)' is missing an @Override annotation. | 110–137 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 126 |
MissingOverride | The method 'getName()' is missing an @Override annotation. | 142–145 |
MissingOverride | The method 'getVersion()' is missing an @Override annotation. | 150–153 |
MissingOverride | The method 'isEnable()' is missing an @Override annotation. | 158–168 |
MissingOverride | The method 'getDescription()' is missing an @Override annotation. | 175–178 |
UnusedFormalParameter | Avoid unused method parameters such as 'plugin'. | 198 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 229 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 230 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 230 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 231 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 232 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 232 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 233 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 234 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 234 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 249 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 250 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 250 |
MissingOverride | The method 'getListType()' is missing an @Override annotation. | 258–263 |
MissingOverride | The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. | 268–271 |
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. | 64–112 |
ShortVariable | Avoid variables with short names like ir | 78 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 91–103 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 95 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 105 |
Rule | Violation | Ligne |
---|---|---|
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 70 |
Rule | Violation | Ligne |
---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 34–521 |
ImmutableField | Private field '_myLutecePlugin' could be made final; it is only initialized in the declaration or constructor. | 140 |
SingularField | Perhaps '_listProviderAttribute' could be replaced by a local variable. | 142 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 155 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 156 |
UseIndexOfChar | String.indexOf(char) is faster than String.indexOf(String). | 200 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 205–212 |
EmptyStatementNotInLoop | An empty statement (semicolon) not part of a loop | 215 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 238 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 390 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 391–392 |
UseIndexOfChar | String.indexOf(char) is faster than String.indexOf(String). | 422 |
EmptyStatementNotInLoop | An empty statement (semicolon) not part of a loop | 429 |
Rule | Violation | Ligne |
---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 124 |
Rule | Violation | Ligne |
---|---|---|
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 98 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 112 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 121 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 201 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 201 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 132 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 154 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
UnnecessaryLocalBeforeReturn | Consider simply returning the value vs storing it in local variable 'listLocalUser' | 3 | 153 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassNamingConventions | The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 39–58 |
ShortVariable | Avoid variables with short names like ID | 3 | 45 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
FieldNamingConventions | The final field name '_logger' doesn't match '[a-z][a-zA-Z0-9]*' | 1 | 64 |
LoggerIsNotStaticFinal | The Logger variable declaration does not contain the static and final modifiers | 2 | 64 |
UnusedPrivateField | Avoid unused private fields such as 'BEAN_SEARCH_ENGINE'. | 3 | 65 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 41–84 |
CommentRequired | Public method and constructor comments are required | 3 | 53–56 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 65–68 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentRequired | Header comments are required | 3 | 47–92 |
CommentRequired | Public method and constructor comments are required | 3 | 59–62 |
NonThreadSafeSingleton | Singleton is not thread safe | 3 | 71–74 |
UseDiamondOperator | Explicit type arguments can be replaced by Diamond Operator | 3 | 81 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
CommentDefaultAccessModifier | To avoid mistakes add a comment at the beginning of the _pluginName field if you want a default access modifier | 3 | 76 |
DefaultPackage | Use explicit scoping instead of the default package private level | 3 | 76 |
MissingOverride | The method 'indexDocuments()' is missing an @Override annotation. | 3 | 88–101 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 98 |
MissingOverride | The method 'getDocuments(String)' is missing an @Override annotation. | 3 | 110–137 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 112 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 121 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 126 |
MissingOverride | The method 'getName()' is missing an @Override annotation. | 3 | 142–145 |
MissingOverride | The method 'getVersion()' is missing an @Override annotation. | 3 | 150–153 |
MissingOverride | The method 'isEnable()' is missing an @Override annotation. | 3 | 158–168 |
MissingOverride | The method 'getDescription()' is missing an @Override annotation. | 3 | 175–178 |
UnusedFormalParameter | Avoid unused method parameters such as 'plugin'. | 3 | 198 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 201 |
UnnecessaryFullyQualifiedName | Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' | 4 | 201 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 229 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 230 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 230 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 231 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 232 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 232 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 233 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 234 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 234 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 249 |
ConsecutiveAppendsShouldReuse | StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 3 | 250 |
AppendCharacterWithChar | Avoid appending characters as strings in StringBuffer.append. | 3 | 250 |
MissingOverride | The method 'getListType()' is missing an @Override annotation. | 3 | 258–263 |
MissingOverride | The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. | 3 | 268–271 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassNamingConventions | The utility class name 'LocalUserSearchEngine' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' | 1 | 63–112 |
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 | 64–112 |
ShortVariable | Avoid variables with short names like ir | 3 | 78 |
ForLoopCanBeForeach | This for loop can be replaced by a foreach loop | 3 | 91–103 |
UseConcurrentHashMap | If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 3 | 95 |
AvoidCatchingGenericException | Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 3 | 105 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ClassWithOnlyPrivateConstructorsShouldBeFinal | A class which only has private constructors should be final | 1 | 45–83 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
SingularField | Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 3 | 70 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ExcessiveImports | A high number of imports can indicate a high degree of coupling within an object. | 3 | 34–521 |
ImmutableField | Private field '_myLutecePlugin' could be made final; it is only initialized in the declaration or constructor. | 3 | 140 |
SingularField | Perhaps '_listProviderAttribute' could be replaced by a local variable. | 3 | 142 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 155 |
NullAssignment | Assigning an Object to null is a code smell. Consider refactoring. | 3 | 156 |
UseIndexOfChar | String.indexOf(char) is faster than String.indexOf(String). | 3 | 200 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 205–212 |
EmptyStatementNotInLoop | An empty statement (semicolon) not part of a loop | 3 | 215 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 238 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 390 |
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 391–392 |
UseIndexOfChar | String.indexOf(char) is faster than String.indexOf(String). | 3 | 422 |
EmptyStatementNotInLoop | An empty statement (semicolon) not part of a loop | 3 | 429 |
Rule | Violation | Priority | Ligne |
---|---|---|---|
ConfusingTernary | Avoid if (x != y) ..; else ..; | 3 | 124 |