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/mylutece/modules/users/rs/Constants.java

Rule Violation Line
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/rs/LocalUserSearchRestService.java

Rule Violation Line
FieldNamingConventions The final field name '_logger' doesn't match '[a-z][a-zA-Z0-9]*' 64

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

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

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

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

Priority 2

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

Rule Violation Line
LoggerIsNotStaticFinal The Logger variable declaration does not contain the static and final modifiers 64

Priority 3

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

Rule Violation Line
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/LocalUserHome.java

Rule Violation Line
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listLocalUser' 153

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

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

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

Rule Violation Line
UnusedPrivateField Avoid unused private fields such as 'BEAN_SEARCH_ENGINE'. 65

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

Rule Violation Line
CommentRequired Header comments are required 4184
CommentRequired Public method and constructor comments are required 5356
NonThreadSafeSingleton Singleton is not thread safe 6568

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

Rule Violation Line
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/search/LocalUserIndexer.java

Rule Violation Line
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. 88101
MissingOverride The method 'getDocuments(String)' is missing an @Override annotation. 110137
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 126
MissingOverride The method 'getName()' is missing an @Override annotation. 142145
MissingOverride The method 'getVersion()' is missing an @Override annotation. 150153
MissingOverride The method 'isEnable()' is missing an @Override annotation. 158168
MissingOverride The method 'getDescription()' is missing an @Override annotation. 175178
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. 258263
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 268271

fr/paris/lutece/plugins/mylutece/modules/users/service/search/LocalUserSearchEngine.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. 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 Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 70

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

Rule Violation Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 34521
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 ..; 205212
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 ..; 391392
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 422
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 429

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

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

Priority 4

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

Rule Violation Line
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

Files

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

Rule Violation Priority Line
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/LocalUserHome.java

Rule Violation Priority Line
UnnecessaryLocalBeforeReturn Consider simply returning the value vs storing it in local variable 'listLocalUser' 3 153

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

Rule Violation Priority Line
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/rs/LocalUserSearchRestService.java

Rule Violation Priority Line
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

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

Rule Violation Priority Line
CommentRequired Header comments are required 3 4184
CommentRequired Public method and constructor comments are required 3 5356
NonThreadSafeSingleton Singleton is not thread safe 3 6568

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

Rule Violation Priority Line
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/search/LocalUserIndexer.java

Rule Violation Priority Line
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 88101
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 110137
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 142145
MissingOverride The method 'getVersion()' is missing an @Override annotation. 3 150153
MissingOverride The method 'isEnable()' is missing an @Override annotation. 3 158168
MissingOverride The method 'getDescription()' is missing an @Override annotation. 3 175178
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 258263
MissingOverride The method 'getSpecificSearchAppUrl()' is missing an @Override annotation. 3 268271

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

Rule Violation Priority Line
ClassNamingConventions The utility class name 'LocalUserSearchEngine' 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/LocalUserIndexerUtils.java

Rule Violation Priority Line
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 Line
SingularField Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. 3 70

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

Rule Violation Priority Line
ExcessiveImports A high number of imports can indicate a high degree of coupling within an object. 3 34521
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 205212
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 391392
UseIndexOfChar String.indexOf(char) is faster than String.indexOf(String). 3 422
EmptyStatementNotInLoop An empty statement (semicolon) not part of a loop 3 429

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

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