Le document suivant contient les résultats de PMD 5.5.1.
Violation | Ligne |
---|---|
The user-supplied array 'bytes' is stored directly. | 71 |
Returning '_bytes' may expose an internal array. | 82 |
Violation | Ligne |
---|---|
Use explicit scoping instead of the default package private level | 63–81 |
Use block level rather than method level synchronization | 87–100 |
Violation | Ligne |
---|---|
Possible God class (WMC=50, ATFD=12, TCC=0.04358974358974359) | 34–528 |
Avoid unused imports such as 'javax.validation.constraints' | 36 |
Avoid unused imports such as 'org.hibernate.validator.constraints' | 38 |
Avoid unused imports such as 'fr.paris.lutece.util.url.UrlItem' | 45 |
Avoid unused imports such as 'fr.paris.lutece.util.url.UrlItem' | 45 |
A getX() method which returns a boolean should be named isX() | 354–357 |
Violation | Ligne |
---|---|
Possible God class (WMC=51, ATFD=147, TCC=0.008333333333333333) | 35–629 |
Avoid unused imports such as 'java.sql.Timestamp' | 42 |
Avoid unused imports such as 'java.sql.Timestamp' | 42 |
Avoid unused imports such as 'java.util.Collection' | 44 |
Avoid unused imports such as 'java.util.Collection' | 44 |
Avoid unused imports such as 'java.util.Date' | 45 |
Avoid unused imports such as 'java.util.Date' | 45 |
The class 'HtmlDocDAO' has a Cyclomatic Complexity of 3 (Highest = 25). | 54–629 |
The class 'HtmlDocDAO' has a Standard Cyclomatic Complexity of 3 (Highest = 24). | 54–629 |
The class 'HtmlDocDAO' has a Modified Cyclomatic Complexity of 3 (Highest = 24). | 54–629 |
Avoid unused private fields such as 'CONSTANT_QUESTION_MARK'. | 87 |
Avoid unused private fields such as 'CONSTANT_COMMA'. | 88 |
The method 'getDaoFromFilter' has a Modified Cyclomatic Complexity of 24. | 512–626 |
The method getDaoFromFilter() has an NPath complexity of 1018368 | 512–626 |
The method 'getDaoFromFilter' has a Cyclomatic Complexity of 25. | 512–626 |
Avoid really long methods. | 512–626 |
The method 'getDaoFromFilter' has a Standard Cyclomatic Complexity of 24. | 512–626 |
Avoid variables with short names like i | 521 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 574 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 575 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 580 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 585 |
Prefer StringBuffer over += for concatenating strings | 592 |
Prefer StringBuffer over += for concatenating strings | 595 |
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks | 596 |
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks | 609 |
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks | 620 |
Violation | Ligne |
---|---|
Returning '_arrayTagsId' may expose an internal array. | 61 |
Consider using varargs for methods or constructors which take an array the last parameter. | 67 |
The user-supplied array 'arrayTagsId' is stored directly. | 67 |
Returning '_arrayId' may expose an internal array. | 96 |
Consider using varargs for methods or constructors which take an array the last parameter. | 102 |
The user-supplied array 'arrayId' is stored directly. | 102 |
A getX() method which returns a boolean should be named isX() | 112–115 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' | 36 |
Avoid unused imports such as 'fr.paris.lutece.portal.service.i18n.I18nService' | 36 |
Avoid unused imports such as 'java.util.Date' | 42 |
Avoid unused imports such as 'java.util.Date' | 42 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'java.sql.Timestamp' | 40 |
Avoid unused imports such as 'java.sql.Timestamp' | 40 |
Avoid unused imports such as 'java.util.Collection' | 41 |
Avoid unused imports such as 'java.util.Collection' | 41 |
Avoid unused imports such as 'java.util.Date' | 42 |
Avoid unused imports such as 'java.util.Date' | 42 |
Violation | Ligne |
---|---|
Use block level rather than method level synchronization | 88–100 |
Violation | Ligne |
---|---|
Use block level rather than method level synchronization | 33–79 |
Use block level rather than method level synchronization | 85–88 |
Violation | Ligne |
---|---|
Avoid short class names like Tag | 3–77 |
Document empty constructor | 11–14 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'java.util.HashMap' | 39 |
Avoid unused imports such as 'java.util.HashMap' | 39 |
Avoid unused imports such as 'java.util.Map' | 41 |
Avoid unused imports such as 'java.util.Map' | 41 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'java.util.Map' | 42 |
Avoid unused imports such as 'java.util.Map' | 42 |
Violation | Ligne |
---|---|
A class which only has private constructors should be final | 13–137 |
Violation | Ligne |
---|---|
It is a good practice to call super() in a constructor | 78–81 |
Unnecessary use of fully qualified name 'java.util.GregorianCalendar' due to existing import 'java.util.GregorianCalendar' | 89 |
Avoid using if statements without curly braces | 203 |
Violation | Ligne |
---|---|
Possible unsafe assignment to a non-final static field in a constructor. | 58 |
Avoid using redundant field initializer for '_singleton' | 58 |
It is a good practice to call super() in a constructor | 63–69 |
Singleton is not thread safe | 78–81 |
Violation | Ligne |
---|---|
The class 'HtmldocsListPortletDAO' has a Modified Cyclomatic Complexity of 3 (Highest = 10). | 52–347 |
The class 'HtmldocsListPortletDAO' has a Standard Cyclomatic Complexity of 3 (Highest = 10). | 52–347 |
The class 'HtmldocsListPortletDAO' has a Cyclomatic Complexity of 3 (Highest = 10). | 52–347 |
Avoid variables with short names like p | 84 |
Avoid variables with short names like p | 102 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 182 |
Avoid variables with short names like p | 232 |
The method 'selectPortletByType' has a Cyclomatic Complexity of 10. | 292–345 |
The method 'selectPortletByType' has a Modified Cyclomatic Complexity of 10. | 292–345 |
The method 'selectPortletByType' has a Standard Cyclomatic Complexity of 10. | 292–345 |
Assigning an Object to null is a code smell. Consider refactoring. | 297 |
Violation | Ligne |
---|---|
It is a good practice to call super() in a constructor | 57–60 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 62 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 64 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 66 |
Unnecessary use of fully qualified name 'java.util.GregorianCalendar' due to existing import 'java.util.GregorianCalendar' | 79 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'java.sql.Date' | 36 |
Avoid unused imports such as 'java.sql.Date' | 36 |
The class 'HtmldocsPortletDAO' has a Modified Cyclomatic Complexity of 3 (Highest = 10). | 48–248 |
The class 'HtmldocsPortletDAO' has a Standard Cyclomatic Complexity of 3 (Highest = 10). | 48–248 |
The class 'HtmldocsPortletDAO' has a Cyclomatic Complexity of 3 (Highest = 10). | 48–248 |
Avoid variables with short names like p | 73 |
Avoid variables with short names like p | 110 |
Avoid variables with short names like p | 157 |
The method 'selectPortletByType' has a Modified Cyclomatic Complexity of 10. | 195–246 |
The method 'selectPortletByType' has a Cyclomatic Complexity of 10. | 195–246 |
The method 'selectPortletByType' has a Standard Cyclomatic Complexity of 10. | 195–246 |
Assigning an Object to null is a code smell. Consider refactoring. | 200 |
Violation | Ligne |
---|---|
Possible unsafe assignment to a non-final static field in a constructor. | 53 |
It is a good practice to call super() in a constructor | 58–64 |
Singleton is not thread safe | 86–89 |
Violation | Ligne |
---|---|
The class 'PortletFilter' has a Cyclomatic Complexity of 2 (Highest = 13). | 44–225 |
The user-supplied array 'strPageTitle' is stored directly. | 67 |
Consider using varargs for methods or constructors which take an array the last parameter. | 67 |
Returning '_tabPageName' may expose an internal array. | 78 |
Consider using varargs for methods or constructors which take an array the last parameter. | 85 |
The user-supplied array 'strPortletTitle' is stored directly. | 85 |
Returning '_tabPortletName' may expose an internal array. | 96 |
The method 'getSQLFilter' has a Cyclomatic Complexity of 13. | 159–206 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.PortletHome' | 43 |
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.PortletHome' | 43 |
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.PortletType' | 44 |
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.PortletType' | 44 |
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.PortletTypeHome' | 45 |
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.PortletTypeHome' | 45 |
Avoid unused imports such as 'com.mysql.fabric.xmlrpc.base.Array' | 67 |
Avoid unused imports such as 'com.mysql.fabric.xmlrpc.base.Array' | 67 |
Avoid unnecessary if..then..else statements when returning booleans | 116–119 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 168 |
Avoid unused local variables such as 'stridPortlet'. | 168 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 303 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 344 |
Violation | Ligne |
---|---|
Use block level rather than method level synchronization | 59–71 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'java.util.Map' | 39 |
Avoid unused imports such as 'java.util.Map' | 39 |
Avoid unused imports such as 'java.util.Map.Entry' | 40 |
Avoid unused imports such as 'java.util.Map.Entry' | 40 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 103 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 129 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 168 |
Violation | Ligne |
---|---|
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 149 |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 268 |
Avoid variables with short names like i | 274 |
Violation | Ligne |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 1–347 |
Avoid variables with short names like it | 73 |
Use block level rather than method level synchronization | 87–162 |
Unnecessary use of fully qualified name 'fr.paris.lutece.plugins.htmldocs.business.IndexerAction' due to existing import 'fr.paris.lutece.plugins.htmldocs.business.IndexerAction' | 97 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 149 |
New exception is thrown in catch block, original stack trace may be lost | 209 |
New exception is thrown in catch block, original stack trace may be lost | 213 |
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 242 |
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 243 |
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 244 |
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. | 245 |
Violation | Ligne |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 2–335 |
Use of modifier volatile is not recommended. | 58 |
Use of modifier volatile is not recommended. | 59 |
Private field '_indexer' could be made final; it is only initialized in the declaration or constructor. | 61 |
Private field '_nWriterMergeFactor' could be made final; it is only initialized in the declaration or constructor. | 62 |
Private field '_nWriterMaxSectorLength' could be made final; it is only initialized in the declaration or constructor. | 63 |
Avoid unused private fields such as '_nWriterMaxSectorLength'. | 63 |
Perhaps '_nWriterMaxSectorLength' could be replaced by a local variable. | 63 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 96 |
Singleton is not thread safe | 108–111 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 144 |
Avoid variables with short names like ir | 166 |
StringBuffer constructor is initialized with size 16, but has at least 147 characters appended. | 197 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 203 |
StringBuffer (or StringBuilder).append is called 2 consecutive times with literal Strings. Use a single append with a single combined String. | 243 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 246 |
Violation | Ligne |
---|---|
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 53 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 58 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 63 |
Fields should be declared at the top of the class, before any method declarations, constructors, initializers or inner classes. | 69 |
Violation | Ligne |
---|---|
Avoid variables with short names like si | 102 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 106 |
Violation | Ligne |
---|---|
Avoid unused imports such as 'fr.paris.lutece.plugins.htmldocs.service.HtmldocsPlugin' | 7 |
Avoid unused imports such as 'fr.paris.lutece.plugins.htmldocs.service.HtmldocsPlugin' | 7 |
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' | 12 |
Avoid unused imports such as 'fr.paris.lutece.portal.service.plugin.Plugin' | 12 |
Avoid unused private fields such as 'ROLE_NONE'. | 37 |
Position literals first in String comparisons for EqualsIgnoreCase | 74 |
This statement may have some unnecessary parentheses | 74 |
Violation | Ligne |
---|---|
Avoid using Literals in Conditional Statements | 58 |
Violation | Ligne |
---|---|
Avoid unused private fields such as 'LOG_UNAUTHENTICATED_REQUEST'. | 69 |
Avoid variables with short names like os | 116 |
Violation | Ligne |
---|---|
Possible God class (WMC=66, ATFD=110, TCC=0.3161764705882353) | 34–810 |
A high number of imports can indicate a high degree of coupling within an object. | 34–810 |
The class 'HtmlDocJspBean' has a Cyclomatic Complexity of 4 (Highest = 14). | 99–810 |
The class 'HtmlDocJspBean' has a Modified Cyclomatic Complexity of 3 (Highest = 11). | 99–810 |
The class 'HtmlDocJspBean' has a Standard Cyclomatic Complexity of 3 (Highest = 11). | 99–810 |
Avoid unused private fields such as 'PROPERTY_RESOURCE_TYPE'. | 141 |
Avoid unused private fields such as 'VIEW_PREVIOUS_VERSION_HTMLDOC'. | 175 |
Avoid using redundant field initializer for '_bIsChecked' | 207 |
Avoid using redundant field initializer for '_bIsSorted' | 212 |
The method 'getManageHtmlDocs' has a Cyclomatic Complexity of 14. | 226–315 |
The method 'getManageHtmlDocs' has a Standard Cyclomatic Complexity of 11. | 226–315 |
The method 'getManageHtmlDocs' has a Modified Cyclomatic Complexity of 11. | 226–315 |
The method getManageHtmlDocs() has an NPath complexity of 396 | 226–315 |
Assigning an Object to null is a code smell. Consider refactoring. | 228 |
Avoid using if statements without curly braces | 252 |
Avoid using if statements without curly braces | 253 |
Avoid using if statements without curly braces | 254 |
Avoid unnecessary comparisons in boolean expressions | 280 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 303 |
Do not add empty strings | 311 |
Assigning an Object to null is a code smell. Consider refactoring. | 320 |
This statement may have some unnecessary parentheses | 366 |
Avoid variables with short names like tg | 434 |
Position literals first in String comparisons | 450 |
Position literals first in String comparisons | 455 |
Substitute calls to size() == 0 (or size() != 0, size() > 0, size() < 1) with calls to isEmpty() | 506 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 580 |
Assigning an Object to null is a code smell. Consider refactoring. | 610 |
Avoid variables with short names like tf | 714 |
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block | 734 |
Violation | Ligne |
---|---|
A high number of imports can indicate a high degree of coupling within an object. | 34–474 |
The class 'HtmlDocPublicationJspBean' has a Cyclomatic Complexity of 6 (Highest = 13). | 80–474 |
The method 'getManageHtmlDocsPublication' has a Cyclomatic Complexity of 13. | 156–226 |
The method getManageHtmlDocsPublication() has an NPath complexity of 28125 | 156–226 |
Assigning an Object to null is a code smell. Consider refactoring. | 210 |
Assigning an Object to null is a code smell. Consider refactoring. | 211 |
When instantiating a SimpleDateFormat object, specify a Locale | 243 |
Unnecessary use of fully qualified name 'java.sql.Date' due to existing import 'java.sql.Date' | 288 |
Unnecessary use of fully qualified name 'java.sql.Date' due to existing import 'java.sql.Date' | 289 |
When instantiating a SimpleDateFormat object, specify a Locale | 291 |
Unnecessary use of fully qualified name 'java.sql.Date' due to existing import 'java.sql.Date' | 296 |
Unnecessary use of fully qualified name 'java.sql.Date' due to existing import 'java.sql.Date' | 300 |
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation | 414 |
Violation | Ligne |
---|---|
Abstract classes should be named AbstractXXX | 51–135 |
Perhaps '_nDefaultItemsPerPage' could be replaced by a local variable. | 69 |
Avoid using redundant field initializer for '_bIsSorted' | 72 |
Avoid unnecessary comparisons in boolean expressions | 102 |
Do not add empty strings | 129 |
Violation | Ligne |
---|---|
Assigning an Object to null is a code smell. Consider refactoring. | 119 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 205 |
Avoid unused local variables such as 'tag'. | 205 |
Violation | Ligne |
---|---|
Avoid unused local variables such as 'bool'. | 96 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 129 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 131 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 134 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 171 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 174 |
Method names should not start with capital letters | 199 |
Violation | Ligne |
---|---|
This statement may have some unnecessary parentheses | 124 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 142 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 161 |
Avoid declaring a variable if it is unreferenced before a possible exit point. | 198 |