Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/LDAPDatabaseAuthentication.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.plugins.mylutece.modules.ldapdatabase.authentication.business.LdapDatabaseDAO' 38
Avoid unused imports such as 'fr.paris.lutece.plugins.mylutece.modules.ldapdatabase.authentication.business.LdapDatabaseDAO' 38
Avoid unused imports such as 'fr.paris.lutece.portal.service.spring.SpringContextService' 46
Avoid unused imports such as 'fr.paris.lutece.portal.service.spring.SpringContextService' 46
Avoid unnecessary constructors - the compiler will generate these for you 8184
Avoid declaring a variable if it is unreferenced before a possible exit point. 138
Avoid declaring a variable if it is unreferenced before a possible exit point. 152
Document empty method 174175

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/business/ILdapDatabaseDAO.java

Violation Line
Avoid using implementation types like 'ArrayList'; use the interface instead 68
Avoid using implementation types like 'ArrayList'; use the interface instead 68
Avoid using implementation types like 'ArrayList'; use the interface instead 77
Avoid using implementation types like 'ArrayList'; use the interface instead 77

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/business/LdapDatabaseDAO.java

Violation Line
Use explicit scoping instead of the default package private level 7174
Avoid using implementation types like 'ArrayList'; use the interface instead 118
Avoid using implementation types like 'ArrayList'; use the interface instead 118
Avoid using implementation types like 'ArrayList'; use the interface instead 142
Avoid using implementation types like 'ArrayList'; use the interface instead 142

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/business/LdapDatabaseHome.java

Violation Line
Avoid using implementation types like 'ArrayList'; use the interface instead 82
Avoid using implementation types like 'ArrayList'; use the interface instead 82
Avoid using implementation types like 'ArrayList'; use the interface instead 94
Avoid using implementation types like 'ArrayList'; use the interface instead 94

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/business/LdapUser.java

Violation Line
Singleton is not thread safe 5862

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/business/LdapUserDAO.java

Violation Line
Use explicit scoping instead of the default package private level 7275

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/business/LdapUserRoleRemovalListener.java

Violation Line
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 67
Avoid unnecessary if..then..else statements when returning booleans 6770

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/util/LdapBrowser.java

Violation Line
Possible God class (WMC=57, ATFD=42, TCC=0.06190476190476191) 34624
The class 'LdapBrowser' has a Cyclomatic Complexity of 3 (Highest = 10). 61624
Avoid excessively long variable names like PROPERTY_USER_DN_SEARCH_FILTER_BY_CRITERIA_GIVENNAME 71
Avoid unnecessary constructors - the compiler will generate these for you 121123
Document empty constructor 121123
Avoid variables with short names like sr 138
The String literal "' with search filter : " appears 4 times in this file; the first occurrence is on line 206 206
The method 'getUserPublicData' has a Cyclomatic Complexity of 10. 228316
Avoid variables with short names like sr 231
Avoid using Literals in Conditional Statements 290
Avoid variables with short names like dn 329
Avoid variables with short names like sr 330
Avoid using Literals in Conditional Statements 362
Avoid variables with short names like in 425
Avoid prefixing parameters by in, out or inOut. Uses Javadoc to document this behavior. 425
Avoid variables with short names like sb 437
StringBuffer constructor is initialized with size 16, but has at least 26 characters appended. 437
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 438
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 439
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 440
Position literals first in String comparisons for EqualsIgnoreCase 517
Consider using varargs for methods or constructors which take an array the last parameter. 547
Avoid unnecessary comparisons in boolean expressions 553
Prefer StringBuffer over += for concatenating strings 555
Prefer StringBuffer over += for concatenating strings 559
Assigning an Object to null is a code smell. Consider refactoring. 602

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/util/LdapUtil.java

Violation Line
Rather than using a lot of String arguments, consider using a container object for those values. 6869
Consider replacing this Hashtable with the newer java.util.Map 71
Rather than using a lot of String arguments, consider using a container object for those values. 106
Consider replacing this Hashtable with the newer java.util.Map 111
Avoid variables with short names like sc 134

fr/paris/lutece/plugins/mylutece/modules/ldapdatabase/authentication/web/LdapdatabaseJspBean.java

Violation Line
It is a good practice to call super() in a constructor 116118
Document empty constructor 116118
Avoid unnecessary constructors - the compiler will generate these for you 116118
Position literals first in String comparisons 162
Avoid unnecessary comparisons in boolean expressions 162
Avoid unnecessary comparisons in boolean expressions 162
Position literals first in String comparisons 162
Avoid unnecessary comparisons in boolean expressions 163
Position literals first in String comparisons 163
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 170
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 176
Avoid declaring a variable if it is unreferenced before a possible exit point. 196
Avoid declaring a variable if it is unreferenced before a possible exit point. 197
Avoid declaring a variable if it is unreferenced before a possible exit point. 198
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() 215
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 359