bogeblad/infoglue — Issue #16: Unused variable into code
Author: astik
Created: 2012-02-12 18:42:18+00:00
State: open

When using eclipse (in my case indigo), validation can check for unused variable which is a very useful feature.

Into infoglue, right now, we can see that there are a lot of unused variable :
- some are simple variable which are simply never user
- some are variable defined to hold result of a method which is never used, so we cannot know if it is the variable that is useless or the method call ...

For example, into ChangeMultiContentStatePublishAction.java, we have on line 79 :
SiteNodeVersion siteNodeVersion = SiteNodeStateController.getController().changeState(siteNodeVersionId, SiteNodeVersionVO.PUBLISH_STATE, getVersionComment(), overrideVersionModifyer, this.recipientFilter, this.getInfoGluePrincipal(), null, events);
I can imagine that the method is useful but the created variable is useless and can be remove.
In some case, removing the defined variable can also lead to remove the needed import, that way we can reduce code coupling.

The project may need some clean up with eclipse help =/