Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

fr/paris/lutece/plugins/xmlpage/business/portlet/XmlPagePortlet.java

Violation Line
It is a good practice to call super() in a constructor 6972
Deeply nested if..then statements are hard to read 151154

fr/paris/lutece/plugins/xmlpage/business/portlet/XmlPagePortletDAO.java

Violation Line
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO' 36
Avoid unused imports such as 'fr.paris.lutece.portal.business.portlet.IPortletInterfaceDAO' 36
Avoid variables with short names like p 63
Avoid variables with short names like p 92

fr/paris/lutece/plugins/xmlpage/business/portlet/XmlPagePortletHome.java

Violation Line
Avoid using redundant field initializer for '_singleton' 52
Possible unsafe assignment to a non-final static field in a constructor. 52
It is a good practice to call super() in a constructor 5763
Singleton is not thread safe 8588

fr/paris/lutece/plugins/xmlpage/service/FetchXmlFilesService.java

Violation Line
The class 'FetchXmlFilesService' has a Cyclomatic Complexity of 5 (Highest = 12). 59449
The class 'FetchXmlFilesService' has a Modified Cyclomatic Complexity of 4 (Highest = 10). 59449
The class 'FetchXmlFilesService' has a Standard Cyclomatic Complexity of 4 (Highest = 10). 59449
The method 'fetchXmlFiles' has a Cyclomatic Complexity of 12. 92170
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 101
The method 'copyAllXmlAndResources' has a Standard Cyclomatic Complexity of 10. 297388
The method 'copyAllXmlAndResources' has a Modified Cyclomatic Complexity of 10. 297388
The method 'copyAllXmlAndResources' has a Cyclomatic Complexity of 10. 297388
Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 367
Avoid concatenating nonliterals in a StringBuffer/StringBuilder constructor or append(). 379

fr/paris/lutece/plugins/xmlpage/service/XmlPageLoaderProperties.java

Violation Line
Avoid unused local variables such as 'listFiles'. 193
Avoid declaring a variable if it is unreferenced before a possible exit point. 193
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 225
Avoid variables with short names like is 231
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 322
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 343
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 373
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 401

fr/paris/lutece/plugins/xmlpage/service/XmlPageService.java

Violation Line
It is a good practice to call super() in a constructor 6973

fr/paris/lutece/plugins/xmlpage/util/XmlPageContentUtils.java

Violation Line
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. 51129
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 83
Deeply nested if..then statements are hard to read 90116
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 93
If you run in Java5 or newer and have concurrent access, you should use the ConcurrentHashMap implementation 103
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 118

fr/paris/lutece/plugins/xmlpage/util/XmlPageFileUtils.java

Violation Line
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. 50190
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 67
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 79
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 106
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 136
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 151
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 163

fr/paris/lutece/plugins/xmlpage/util/XmlPageXercesErrorHandler.java

Violation Line
StringBuffer constructor is initialized with size 16, but has at least 25 characters appended. 55
Avoid variables with short names like sb 55
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 56
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 57
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 58
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 59
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 60
Avoid variables with short names like sb 73
StringBuffer constructor is initialized with size 16, but has at least 31 characters appended. 73
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 74
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 75
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 76
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 77
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 78
Avoid variables with short names like sb 90
StringBuffer constructor is initialized with size 16, but has at least 27 characters appended. 90
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 91
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 92
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 93
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 94
StringBuffer (or StringBuilder).append is called consecutively without reusing the target variable. 95

fr/paris/lutece/plugins/xmlpage/web/XmlPageApp.java

Violation Line
The class 'XmlPageApp' has a Cyclomatic Complexity of 11 (Highest = 10). 55168
The method 'getPage' has a Cyclomatic Complexity of 10. 92167

fr/paris/lutece/plugins/xmlpage/web/portlet/XmlPagePortletJspBean.java

Violation Line
Avoid declaring a variable if it is unreferenced before a possible exit point. 126
Avoid declaring a variable if it is unreferenced before a possible exit point. 130
Avoid declaring a variable if it is unreferenced before a possible exit point. 133
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. 136
Avoid unused local variables such as 'strStyleId'. 136
Avoid declaring a variable if it is unreferenced before a possible exit point. 175