Fork me on GitHub

PMD Results

The following document contains the results of PMD 5.3.5.

Files

com/mycomp/portal/jsr286/PublishEventPortlet.java

Violation Line
No need to import a type that lives in the same package 46

com/mycomp/portal/jsr286/SubscribeEventPortlet.java

Violation Line
No need to import a type that lives in the same package 46

fr/paris/lutece/plugins/jsr286/business/portlet/Jsr286Portlet.java

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

fr/paris/lutece/plugins/jsr286/business/portlet/Jsr286PortletDAO.java

Violation Line
Use explicit scoping instead of the default package private level 6770
Avoid variables with short names like p 82
Avoid variables with short names like p 138

fr/paris/lutece/plugins/jsr286/business/portlet/Jsr286PortletHome.java

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

fr/paris/lutece/plugins/jsr286/pluto/Buttons.java

Violation Line
Avoid unused imports such as 'org.apache.pluto.driver.url.PortalURLParser' 55
Avoid unused imports such as 'org.apache.pluto.driver.url.PortalURLParser' 55
Avoid unused imports such as 'org.apache.pluto.driver.url.impl.RelativePortalURLImpl' 57
Avoid unused imports such as 'org.apache.pluto.driver.url.impl.RelativePortalURLImpl' 57
Use explicit scoping instead of the default package private level 88165
Avoid unused local variables such as 'portletID'. 91
Avoid unused local variables such as 'contextPath'. 100
Avoid unused local variables such as 'servletName'. 101

fr/paris/lutece/plugins/jsr286/pluto/LuteceHttpServletResponse.java

Violation Line
Private field '_servletOutputStream' could be made final; it is only initialized in the declaration or constructor. 57
Private field '_printWriter' could be made final; it is only initialized in the declaration or constructor. 58
Private field '_buffer' could be made final; it is only initialized in the declaration or constructor. 59
Avoid variables with short names like b 74
New exception is thrown in catch block, original stack trace may be lost 99
Avoid throwing raw exception types. 99
Overriding method merely calls super 195199
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 282
debug logging that involves string concatenation should be guarded with isDebugEnabled() checks 297

fr/paris/lutece/plugins/jsr286/pluto/LuteceToPlutoConnector.java

Violation Line
A high number of imports can indicate a high degree of coupling within an object. 34457
Avoid unused imports such as 'javax.servlet.RequestDispatcher' 41
Avoid unused imports such as 'javax.servlet.RequestDispatcher' 41
Avoid unused imports such as 'org.apache.pluto.driver.container.DefaultOptionalContainerServices' 58
Avoid unused imports such as 'org.apache.pluto.driver.container.DefaultOptionalContainerServices' 58
No need to import a type that lives in the same package 77
No need to import a type that lives in the same package 79
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. 85457
The field name indicates a constant but its modifiers do not 86
The field name indicates a constant but its modifiers do not 87
The field name indicates a constant but its modifiers do not 88
Avoid unused local variables such as 'test'. 103
Avoid unused local variables such as 'applicationName'. 113
Avoid printStackTrace(); use a logger call instead. 115
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 118
Avoid printStackTrace(); use a logger call instead. 119
Avoid declaring a variable if it is unreferenced before a possible exit point. 131
Avoid unused local variables such as 'request'. 131
Avoid variables with short names like it 134
Avoid unused local variables such as 'pReqCtx'. 159
Avoid declaring a variable if it is unreferenced before a possible exit point. 159
Avoid unused local variables such as 'portalUrl'. 196
Avoid declaring a variable if it is unreferenced before a possible exit point. 196
Avoid unused local variables such as 'tempPRS'. 200
Avoid declaring a variable if it is unreferenced before a possible exit point. 200
Avoid declaring a variable if it is unreferenced before a possible exit point. 202
Avoid unused local variables such as 'tempPD'. 202
Avoid printStackTrace(); use a logger call instead. 242
Avoid printStackTrace(); use a logger call instead. 246
Avoid printStackTrace(); use a logger call instead. 250
Avoid catching generic exceptions such as NullPointerException, RuntimeException, Exception in try-catch block 252
Avoid printStackTrace(); use a logger call instead. 253
Avoid declaring a variable if it is unreferenced before a possible exit point. 261
Avoid unused local variables such as 'request'. 261
Avoid unused local variables such as 'portalUrl'. 303
Avoid declaring a variable if it is unreferenced before a possible exit point. 303
Avoid declaring a variable if it is unreferenced before a possible exit point. 306
Avoid unused local variables such as 'tempPRS'. 306
Avoid declaring a variable if it is unreferenced before a possible exit point. 308
Avoid unused local variables such as 'tempPD'. 308
Avoid unused local variables such as 'servletContext'. 318
Avoid declaring a variable if it is unreferenced before a possible exit point. 318
A catch statement should never catch throwable since it includes errors. 339
Avoid printStackTrace(); use a logger call instead. 341
Avoid declaring a variable if it is unreferenced before a possible exit point. 371
Avoid unused local variables such as 'portalUrl'. 371
Avoid unused local variables such as 'tempPRS'. 376
Avoid declaring a variable if it is unreferenced before a possible exit point. 376
Avoid unused local variables such as 'tempPD'. 378
Avoid declaring a variable if it is unreferenced before a possible exit point. 378
Avoid declaring a variable if it is unreferenced before a possible exit point. 384
Avoid unused local variables such as 'servletContext'. 384
A catch statement should never catch throwable since it includes errors. 406
Avoid printStackTrace(); use a logger call instead. 408

fr/paris/lutece/plugins/jsr286/pluto/OptionalContainerServicesImpl.java

Violation Line
Private field '_ccppps' could be made final; it is only initialized in the declaration or constructor. 48

fr/paris/lutece/plugins/jsr286/pluto/PlutoSession.java

Violation Line
Use block level rather than method level synchronization 7693

fr/paris/lutece/plugins/jsr286/pluto/PortalContextImpl.java

Violation Line
Avoid unused imports such as 'javax.servlet.ServletConfig' 42
Avoid unused imports such as 'javax.servlet.ServletConfig' 42
Avoid using implementation types like 'Vector'; use the interface instead 45
Avoid using implementation types like 'Vector'; use the interface instead 45
Consider replacing this Vector with the newer java.util.List 45
Avoid using implementation types like 'Vector'; use the interface instead 46
Consider replacing this Vector with the newer java.util.List 46
Avoid using implementation types like 'Vector'; use the interface instead 46
Use ArrayList instead of Vector 72
Use ArrayList instead of Vector 91

fr/paris/lutece/plugins/jsr286/pluto/RequiredContainerServicesImpl.java

Violation Line
Private field '_pc' could be made final; it is only initialized in the declaration or constructor. 53
Private field '_ecs' could be made final; it is only initialized in the declaration or constructor. 54
Private field '_fms' could be made final; it is only initialized in the declaration or constructor. 55
Private field '_prcs' could be made final; it is only initialized in the declaration or constructor. 56
Private field '_puls' could be made final; it is only initialized in the declaration or constructor. 57

fr/paris/lutece/plugins/jsr286/web/portlet/Jsr286PortletJspBean.java

Violation Line
Avoid unused imports such as 'org.apache.pluto.container.PortletWindow' 52
Avoid unused imports such as 'org.apache.pluto.container.PortletWindow' 52
Avoid unused private fields such as 'COMBO_PORTLETS_LIST'. 79
It is a good practice to call super() in a constructor 8789
Avoid unnecessary constructors - the compiler will generate these for you 8789
Document empty constructor 8789
Avoid using Literals in Conditional Statements 159
Avoid using Literals in Conditional Statements 203
Use explicit scoping instead of the default package private level 248257

org/apache/pluto/examples/HelloWorldPortlet.java

Violation Line
Avoid unused local variables such as 'bundle'. 59
Document empty method 7172