Fork me on GitHub

Résultats PMD

Le document suivant contient les résultats de PMD 6.13.0.

Violations By Priority

Priority 1

fr/paris/lutece/plugins/mylutece/modules/users/rs/Constants.java

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

fr/paris/lutece/plugins/mylutece/modules/users/service/search/MyLuteceSearchUserSearchEngine.java

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

fr/paris/lutece/plugins/mylutece/modules/users/utils/MyLuteceSearchUserIndexerUtils.java

Rule Violation Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 4583

Priority 3

fr/paris/lutece/plugins/mylutece/modules/users/business/AttributeMappingDAO.java

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

fr/paris/lutece/plugins/mylutece/modules/users/business/MyLuteceSearchUserHome.java

Rule Violation Ligne
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listMyLuteceSearchUser' 154

fr/paris/lutece/plugins/mylutece/modules/users/rs/Constants.java

Rule Violation Ligne
ShortVariable Avoid variables with short names like ID 45

fr/paris/lutece/plugins/mylutece/modules/users/service/MyLuteceUserRoleProvider.java

Rule Violation Ligne
CommentRequired Header comments are required 4792
CommentRequired Public method and constructor comments are required 5962
NonThreadSafeSingleton Singleton is not thread safe 7174
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 81

fr/paris/lutece/plugins/mylutece/modules/users/service/MyLuteceUserSearchService.java

Rule Violation Ligne
NonThreadSafeSingleton Singleton is not thread safe 7477

fr/paris/lutece/plugins/mylutece/modules/users/service/search/MyLuteceSearchUserIndexer.java

Rule Violation Ligne
CommentDefaultAccessModifier To avoid mistakes add a comment at the beginning of the _pluginName field if you want a default access modifier 79
DefaultPackage Use explicit scoping instead of the default package private level 79
MissingOverride The method 'indexDocuments()' is missing an @Override annotation. 92105
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 114141
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 130
MissingOverride The method 'getName()' is missing an @Override annotation. 146149
MissingOverride The method 'getVersion()' is missing an @Override annotation. 154157
MissingOverride The method 'isEnable()' is missing an @Override annotation. 162172
MissingOverride The method 'getDescription()' is missing an @Override annotation. 179182
UnusedFormalParameter Avoid unused method parameters such as 'plugin'. 202
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 233
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 234
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 234
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 235
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 236
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 236
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 237
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 238
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 238
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 253
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 254
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 254
MissingOverride The method 'getListType()' is missing an @Override annotation. 262267
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 272275

fr/paris/lutece/plugins/mylutece/modules/users/service/search/MyLuteceSearchUserSearchEngine.java

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. 64112
ShortVariable Avoid variables with short names like ir 78
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 91103
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

fr/paris/lutece/plugins/mylutece/modules/users/web/AbstractmyLuteceUsersManagementJspBean.java

Rule Violation Ligne
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 70

fr/paris/lutece/plugins/mylutece/modules/users/web/MyLuteceSearchUserJspBean.java

Rule Violation Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34522
ImmutableField Private field '_myLutecePlugin' could be made final; it is only initialized in the declaration or constructor. 141
SingularField Perhaps '_listProviderAttribute' could be replaced by a local variable. 143
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 156
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 157
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 201
ConfusingTernary Avoid if (x != y) ..; else ..; 206213
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 216
ConfusingTernary Avoid if (x != y) ..; else ..; 239
ConfusingTernary Avoid if (x != y) ..; else ..; 391
ConfusingTernary Avoid if (x != y) ..; else ..; 392393
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 423
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 430

fr/paris/lutece/plugins/mylutece/modules/users/web/MyLuteceUserRoleJspBean.java

Rule Violation Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 124

Priority 4

fr/paris/lutece/plugins/mylutece/modules/users/service/search/MyLuteceSearchUserIndexer.java

Rule Violation Ligne
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 102
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 116
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 125
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 205
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 205

Fichiers

fr/paris/lutece/plugins/mylutece/modules/users/business/AttributeMappingDAO.java

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

fr/paris/lutece/plugins/mylutece/modules/users/business/MyLuteceSearchUserHome.java

Rule Violation Priority Ligne
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listMyLuteceSearchUser' 3 154

fr/paris/lutece/plugins/mylutece/modules/users/rs/Constants.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'Constants' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 3958
ShortVariable Avoid variables with short names like ID 3 45

fr/paris/lutece/plugins/mylutece/modules/users/service/MyLuteceUserRoleProvider.java

Rule Violation Priority Ligne
CommentRequired Header comments are required 3 4792
CommentRequired Public method and constructor comments are required 3 5962
NonThreadSafeSingleton Singleton is not thread safe 3 7174
UseDiamondOperator Explicit type arguments can be replaced by Diamond Operator 3 81

fr/paris/lutece/plugins/mylutece/modules/users/service/MyLuteceUserSearchService.java

Rule Violation Priority Ligne
NonThreadSafeSingleton Singleton is not thread safe 3 7477

fr/paris/lutece/plugins/mylutece/modules/users/service/search/MyLuteceSearchUserIndexer.java

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 79
DefaultPackage Use explicit scoping instead of the default package private level 3 79
MissingOverride The method 'indexDocuments()' is missing an @Override annotation. 3 92105
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 102
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 3 114141
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 116
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 125
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 130
MissingOverride The method 'getName()' is missing an @Override annotation. 3 146149
MissingOverride The method 'getVersion()' is missing an @Override annotation. 3 154157
MissingOverride The method 'isEnable()' is missing an @Override annotation. 3 162172
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 179182
UnusedFormalParameter Avoid unused method parameters such as 'plugin'. 3 202
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 205
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'org.apache.lucene.document.Document' due to existing import 'org.apache.lucene.document.Document' 4 205
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 233
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 234
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 235
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 236
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 236
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 237
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 238
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 238
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 253
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 254
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 254
MissingOverride The method 'getListType()' is missing an @Override annotation. 3 262267
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 3 272275

fr/paris/lutece/plugins/mylutece/modules/users/service/search/MyLuteceSearchUserSearchEngine.java

Rule Violation Priority Ligne
ClassNamingConventions The utility class name 'MyLuteceSearchUserSearchEngine' doesn't match '[A-Z][a-zA-Z0-9]+(Utils?|Helper|Home|Service)' 1 63112
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 64112
ShortVariable Avoid variables with short names like ir 3 78
ForLoopCanBeForeach This for loop can be replaced by a foreach loop 3 91103
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

fr/paris/lutece/plugins/mylutece/modules/users/utils/MyLuteceSearchUserIndexerUtils.java

Rule Violation Priority Ligne
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 4583

fr/paris/lutece/plugins/mylutece/modules/users/web/AbstractmyLuteceUsersManagementJspBean.java

Rule Violation Priority Ligne
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 70

fr/paris/lutece/plugins/mylutece/modules/users/web/MyLuteceSearchUserJspBean.java

Rule Violation Priority Ligne
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34522
ImmutableField Private field '_myLutecePlugin' could be made final; it is only initialized in the declaration or constructor. 3 141
SingularField Perhaps '_listProviderAttribute' could be replaced by a local variable. 3 143
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 156
NullAssignment Assigning an Object to null is a code smell. Consider refactoring. 3 157
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 201
ConfusingTernary Avoid if (x != y) ..; else ..; 3 206213
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 3 216
ConfusingTernary Avoid if (x != y) ..; else ..; 3 239
ConfusingTernary Avoid if (x != y) ..; else ..; 3 391
ConfusingTernary Avoid if (x != y) ..; else ..; 3 392393
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 423
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 3 430

fr/paris/lutece/plugins/mylutece/modules/users/web/MyLuteceUserRoleJspBean.java

Rule Violation Priority Ligne
ConfusingTernary Avoid if (x != y) ..; else ..; 3 124