Fixed major issues ("Malicious code vulnerability - Field isn't final") reported in Sonar

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@71959 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tuna Aksoy
2014-05-27 22:27:53 +00:00
parent cbe6192307
commit fc23c3f0f9
7 changed files with 10 additions and 10 deletions

View File

@@ -43,7 +43,7 @@ import org.apache.commons.logging.LogFactory;
public class DeclarativeCapability extends AbstractCapability
{
/** Logger */
protected static Log logger = LogFactory.getLog(DeclarativeCapability.class);
protected static final Log logger = LogFactory.getLog(DeclarativeCapability.class);
/** Required permissions */
protected List<String> permissions;
@@ -212,10 +212,10 @@ public class DeclarativeCapability extends AbstractCapability
// determine the actual value
boolean actual = condition.evaluate(nodeRef);
// report information about condition (for exception reporting)
RMMethodSecurityInterceptor.reportCapabilityCondition(getName(), condition.getName(), expected, actual);
if (expected != actual)
{
result = false;
@@ -224,7 +224,7 @@ public class DeclarativeCapability extends AbstractCapability
{
logger.debug("FAIL: Condition " + condition.getName() + " failed for capability " + getName() + " on nodeRef " + nodeRef.toString());
}
break;
}
}

View File

@@ -24,7 +24,7 @@ public abstract class BaseBehaviourBean extends ServiceBaseImpl
BehaviourRegistry
{
/** Logger */
protected static Log logger = LogFactory.getLog(BaseBehaviourBean.class);
protected static final Log logger = LogFactory.getLog(BaseBehaviourBean.class);
/** behaviour filter */
protected BehaviourFilter behaviourFilter;

View File

@@ -33,7 +33,7 @@ import org.springframework.beans.factory.BeanNameAware;
public abstract class AbstractModulePatch implements ModulePatch, BeanNameAware
{
/** logger */
protected static Log logger = LogFactory.getLog(ModulePatch.class);
protected static final Log logger = LogFactory.getLog(ModulePatch.class);
/** module patch service */
private ModulePatchExecuter modulePatchExecuter;

View File

@@ -40,7 +40,7 @@ public class ModulePatchExecuterImpl extends AbstractModuleComponent
implements ModulePatchExecuter
{
/** logger */
protected static Log logger = LogFactory.getLog(ModulePatchExecuterImpl.class);
protected static final Log logger = LogFactory.getLog(ModulePatchExecuterImpl.class);
/** default start schema */
private static final int START_SCHEMA = 0;

View File

@@ -36,7 +36,7 @@ import org.apache.commons.logging.LogFactory;
public abstract class ModulePatchComponent extends AbstractModuleComponent
{
/** logger */
protected static Log logger = LogFactory.getLog(ModulePatchComponent.class);
protected static final Log logger = LogFactory.getLog(ModulePatchComponent.class);
/** Retrying transaction helper */
protected RetryingTransactionHelper retryingTransactionHelper;

View File

@@ -67,7 +67,7 @@ public class FilePlanPermissionServiceImpl extends ServiceBaseImpl
protected PolicyComponent policyComponent;
/** Logger */
protected static Log logger = LogFactory.getLog(FilePlanPermissionServiceImpl.class);
protected static final Log logger = LogFactory.getLog(FilePlanPermissionServiceImpl.class);
/**
* Initialisation method

View File

@@ -27,7 +27,7 @@ import org.apache.commons.logging.LogFactory;
public class RMMethodSecurityInterceptor extends MethodSecurityInterceptor
{
/** logger */
protected static Log logger = LogFactory.getLog(RMMethodSecurityInterceptor.class);
protected static final Log logger = LogFactory.getLog(RMMethodSecurityInterceptor.class);
/**
* Helper class to hold capability report information