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/adminauthenticationldap/service/LdapService.java

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

fr/paris/lutece/plugins/adminauthenticationldap/service/daemon/ImportLdapAdminUsersDaemon.java

Rule Violation Line
MethodNamingConventions The instance method name 'UpdateAdminUsers' doesn't match '[a-z][a-zA-Z0-9]*' 5884

Priority 2

fr/paris/lutece/plugins/adminauthenticationldap/service/LdapService.java

Rule Violation Line
GuardLogStatement Logger calls should be surrounded by log level guards. 273

Priority 3

fr/paris/lutece/plugins/adminauthenticationldap/AdminLdapAuthentication.java

Rule Violation Line
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 90
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 90
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 94
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 94
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 98
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 98
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 105108
CommentRequired Public method and constructor comments are required 105108
UncommentedEmptyMethodBody Document empty method body 181182

fr/paris/lutece/plugins/adminauthenticationldap/business/AdminLdapUser.java

Rule Violation Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 4255

fr/paris/lutece/plugins/adminauthenticationldap/service/LdapService.java

Rule Violation Line
CommentRequired Header comments are required 58376
GodClass Possible God Class (WMC=51, ATFD=20, TCC=5.147%) 58376
CommentRequired Public method and constructor comments are required 105108
CollapsibleIfStatements These nested if statements could be combined 115118
CommentRequired Public method and constructor comments are required 151162
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 157
CommentRequired Public method and constructor comments are required 164177
UnusedPrivateMethod Avoid unused private methods such as 'getUserBindDN(String)'. 179
ShortVariable Avoid variables with short names like sb 181
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 182
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 182
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 183
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 184
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 184
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 188
CommentRequired Public method and constructor comments are required 194202
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 197
CommentRequired Public method and constructor comments are required 204207
ShortVariable Avoid variables with short names like sr 209
CommentRequired Public method and constructor comments are required 209230
CommentRequired Public method and constructor comments are required 232236
CommentRequired Public method and constructor comments are required 238251
CommentRequired Public method and constructor comments are required 253292
ShortVariable Avoid variables with short names like sr 277
ShortVariable Avoid variables with short names like sr 294
CommentRequired Public method and constructor comments are required 294305
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 26 characters appended. 309
ShortVariable Avoid variables with short names like sb 309
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 310
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 311
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 312
ShortVariable Avoid variables with short names like in 318
ShortVariable Avoid variables with short names like sb 325
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 326
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 333
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 335
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 337
PositionLiteralsFirstInCaseInsensitiveComparisons Position literals first in String comparisons for EqualsIgnoreCase 344
CommentRequired Public method and constructor comments are required 351374
ShortVariable Avoid variables with short names like sr 356
ConfusingTernary Avoid if (x != y) ..; else ..; 357364
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 368

fr/paris/lutece/plugins/adminauthenticationldap/service/daemon/ImportLdapAdminUsersDaemon.java

Rule Violation Line
CommentRequired Header comments are required 4693
ShortVariable Avoid variables with short names like sb 60
ShortVariable Avoid variables with short names like sb 86
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 89

Priority 4

fr/paris/lutece/plugins/adminauthenticationldap/AdminLdapAuthentication.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.adminauthenticationldap.business.AdminLdapUser' 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.business.user.AdminUserDAO' 39
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.admin.AdminAuthenticationService' 44
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 46
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.ldap.LdapUtil' 49
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 50
UnusedImports Avoid unused imports such as 'java.text.MessageFormat' 52
UnusedImports Avoid unused imports such as 'javax.naming.CommunicationException' 55
UnusedImports Avoid unused imports such as 'javax.naming.NamingEnumeration' 56
UnusedImports Avoid unused imports such as 'javax.naming.NamingException' 57
UnusedImports Avoid unused imports such as 'javax.naming.directory' 58
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.Date' due to existing import 'java.util.*' 146
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.lang.UnsupportedOperationException' due to existing implicit import 'java.lang.*' 187

fr/paris/lutece/plugins/adminauthenticationldap/service/LdapService.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.adminauthenticationldap.business.AdminLdapUser' 37
UnusedImports Avoid unused imports such as 'javax.naming.CommunicationException' 46
UnusedImports Avoid unused imports such as 'java.util.Collections' 54
UnusedImports Avoid unused imports such as 'java.util.Map' 56

fr/paris/lutece/plugins/adminauthenticationldap/service/daemon/ImportLdapAdminUsersDaemon.java

Rule Violation Line
UnusedImports Avoid unused imports such as 'java.util.Locale' 44

Files

fr/paris/lutece/plugins/adminauthenticationldap/AdminLdapAuthentication.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.adminauthenticationldap.business.AdminLdapUser' 4 36
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.business.user.AdminUserDAO' 4 39
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.admin.AdminAuthenticationService' 4 44
UnusedImports Avoid unused imports such as 'fr.paris.lutece.portal.service.util.AppLogService' 4 46
UnusedImports Avoid unused imports such as 'fr.paris.lutece.util.ldap.LdapUtil' 4 49
UnusedImports Avoid unused imports such as 'org.apache.commons.lang3.StringUtils' 4 50
UnusedImports Avoid unused imports such as 'java.text.MessageFormat' 4 52
UnusedImports Avoid unused imports such as 'javax.naming.CommunicationException' 4 55
UnusedImports Avoid unused imports such as 'javax.naming.NamingEnumeration' 4 56
UnusedImports Avoid unused imports such as 'javax.naming.NamingException' 4 57
UnusedImports Avoid unused imports such as 'javax.naming.directory' 4 58
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 90
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 90
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 94
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 94
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 98
UseLocaleWithCaseConversions When doing a String.toLowerCase()/toUpperCase() call, use a Locale 3 98
UnnecessaryConstructor Avoid unnecessary constructors - the compiler will generate these for you 3 105108
CommentRequired Public method and constructor comments are required 3 105108
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.util.Date' due to existing import 'java.util.*' 4 146
UncommentedEmptyMethodBody Document empty method body 3 181182
UnnecessaryFullyQualifiedName Unnecessary use of fully qualified name 'java.lang.UnsupportedOperationException' due to existing implicit import 'java.lang.*' 4 187

fr/paris/lutece/plugins/adminauthenticationldap/business/AdminLdapUser.java

Rule Violation Priority Line
MissingSerialVersionUID Classes implementing Serializable should set a serialVersionUID 3 4255

fr/paris/lutece/plugins/adminauthenticationldap/service/LdapService.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'fr.paris.lutece.plugins.adminauthenticationldap.business.AdminLdapUser' 4 37
UnusedImports Avoid unused imports such as 'javax.naming.CommunicationException' 4 46
UnusedImports Avoid unused imports such as 'java.util.Collections' 4 54
UnusedImports Avoid unused imports such as 'java.util.Map' 4 56
ClassWithOnlyPrivateConstructorsShouldBeFinal A class which only has private constructors should be final 1 58376
CommentRequired Header comments are required 3 58376
GodClass Possible God Class (WMC=51, ATFD=20, TCC=5.147%) 3 58376
CommentRequired Public method and constructor comments are required 3 105108
CollapsibleIfStatements These nested if statements could be combined 3 115118
CommentRequired Public method and constructor comments are required 3 151162
AvoidCatchingGenericException Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 3 157
CommentRequired Public method and constructor comments are required 3 164177
UnusedPrivateMethod Avoid unused private methods such as 'getUserBindDN(String)'. 3 179
ShortVariable Avoid variables with short names like sb 3 181
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 182
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 182
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 183
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 184
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 184
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 188
CommentRequired Public method and constructor comments are required 3 194202
AvoidLiteralsInIfCondition Avoid using Literals in Conditional Statements 3 197
CommentRequired Public method and constructor comments are required 3 204207
ShortVariable Avoid variables with short names like sr 3 209
CommentRequired Public method and constructor comments are required 3 209230
CommentRequired Public method and constructor comments are required 3 232236
CommentRequired Public method and constructor comments are required 3 238251
CommentRequired Public method and constructor comments are required 3 253292
GuardLogStatement Logger calls should be surrounded by log level guards. 2 273
ShortVariable Avoid variables with short names like sr 3 277
ShortVariable Avoid variables with short names like sr 3 294
CommentRequired Public method and constructor comments are required 3 294305
InsufficientStringBufferDeclaration StringBuffer constructor is initialized with size 16, but has at least 26 characters appended. 3 309
ShortVariable Avoid variables with short names like sb 3 309
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 310
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 311
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 312
ShortVariable Avoid variables with short names like in 3 318
ShortVariable Avoid variables with short names like sb 3 325
ConsecutiveAppendsShouldReuse StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 3 326
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 330
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 333
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 335
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 337
PositionLiteralsFirstInCaseInsensitiveComparisons Position literals first in String comparisons for EqualsIgnoreCase 3 344
CommentRequired Public method and constructor comments are required 3 351374
ShortVariable Avoid variables with short names like sr 3 356
ConfusingTernary Avoid if (x != y) ..; else ..; 3 357364
PreserveStackTrace New exception is thrown in catch block, original stack trace may be lost 3 368

fr/paris/lutece/plugins/adminauthenticationldap/service/daemon/ImportLdapAdminUsersDaemon.java

Rule Violation Priority Line
UnusedImports Avoid unused imports such as 'java.util.Locale' 4 44
CommentRequired Header comments are required 3 4693
MethodNamingConventions The instance method name 'UpdateAdminUsers' doesn't match '[a-z][a-zA-Z0-9]*' 1 5884
ShortVariable Avoid variables with short names like sb 3 60
ShortVariable Avoid variables with short names like sb 3 86
AppendCharacterWithChar Avoid appending characters as strings in StringBuffer.append. 3 89