mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed critical issues reported by sonar (Simplify Conditional)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@63806 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -74,7 +74,7 @@ public final class AuthenticatedUserRolesDataExtractor extends AbstractDataExtra
|
|||||||
*/
|
*/
|
||||||
public boolean isSupported(Serializable data)
|
public boolean isSupported(Serializable data)
|
||||||
{
|
{
|
||||||
if (data == null || !(data instanceof NodeRef))
|
if (!(data instanceof NodeRef))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -51,7 +51,7 @@ public final class FilePlanIdentifierDataExtractor extends AbstractDataExtractor
|
|||||||
*/
|
*/
|
||||||
public boolean isSupported(Serializable data)
|
public boolean isSupported(Serializable data)
|
||||||
{
|
{
|
||||||
if (data == null || !(data instanceof NodeRef))
|
if (!(data instanceof NodeRef))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -65,7 +65,7 @@ public final class FilePlanNamePathDataExtractor extends AbstractDataExtractor
|
|||||||
*/
|
*/
|
||||||
public boolean isSupported(Serializable data)
|
public boolean isSupported(Serializable data)
|
||||||
{
|
{
|
||||||
if (data == null || !(data instanceof NodeRef))
|
if (!(data instanceof NodeRef))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -61,7 +61,7 @@ public final class FilePlanNodeRefPathDataExtractor extends AbstractDataExtracto
|
|||||||
*/
|
*/
|
||||||
public boolean isSupported(Serializable data)
|
public boolean isSupported(Serializable data)
|
||||||
{
|
{
|
||||||
if (data == null || !(data instanceof NodeRef))
|
if (!(data instanceof NodeRef))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -210,7 +210,7 @@ public class DispositionActionImpl implements DispositionAction,
|
|||||||
private boolean getBooleanValue(Object value, boolean defaultValue)
|
private boolean getBooleanValue(Object value, boolean defaultValue)
|
||||||
{
|
{
|
||||||
boolean result = defaultValue;
|
boolean result = defaultValue;
|
||||||
if (value != null && value instanceof Boolean)
|
if (value instanceof Boolean)
|
||||||
{
|
{
|
||||||
result = ((Boolean)value).booleanValue();
|
result = ((Boolean)value).booleanValue();
|
||||||
}
|
}
|
||||||
|
@@ -554,8 +554,7 @@ public class RecordServiceImpl extends BaseBehaviourBean
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean propertyUnchanged = false;
|
boolean propertyUnchanged = false;
|
||||||
if (beforeValue != null && afterValue != null &&
|
if (beforeValue instanceof Date && afterValue instanceof Date)
|
||||||
beforeValue instanceof Date && afterValue instanceof Date)
|
|
||||||
{
|
{
|
||||||
// deal with date values
|
// deal with date values
|
||||||
propertyUnchanged = (((Date)beforeValue).compareTo((Date)afterValue) == 0);
|
propertyUnchanged = (((Date)beforeValue).compareTo((Date)afterValue) == 0);
|
||||||
|
@@ -71,7 +71,7 @@ public class ExtendedActionServiceImpl extends ActionServiceImpl implements Appl
|
|||||||
// get direct access to action condition definition (i.e. ignoring public flag of executer)
|
// get direct access to action condition definition (i.e. ignoring public flag of executer)
|
||||||
ActionConditionDefinition definition = null;
|
ActionConditionDefinition definition = null;
|
||||||
Object bean = extendedApplicationContext.getBean(name);
|
Object bean = extendedApplicationContext.getBean(name);
|
||||||
if (bean != null && bean instanceof ActionConditionEvaluator)
|
if (bean instanceof ActionConditionEvaluator)
|
||||||
{
|
{
|
||||||
ActionConditionEvaluator evaluator = (ActionConditionEvaluator) bean;
|
ActionConditionEvaluator evaluator = (ActionConditionEvaluator) bean;
|
||||||
definition = evaluator.getActionConditionDefintion();
|
definition = evaluator.getActionConditionDefintion();
|
||||||
|
@@ -75,7 +75,7 @@ public class ParameterProcessorComponent implements ParameterSubstitutionSuggest
|
|||||||
Object parameterValue = entry.getValue();
|
Object parameterValue = entry.getValue();
|
||||||
|
|
||||||
// only sub string property values
|
// only sub string property values
|
||||||
if (parameterValue != null && parameterValue instanceof String)
|
if (parameterValue instanceof String)
|
||||||
{
|
{
|
||||||
// set the updated parameter value
|
// set the updated parameter value
|
||||||
ruleItem.setParameterValue(parameterName, process((String)parameterValue, actionedUponNodeRef));
|
ruleItem.setParameterValue(parameterName, process((String)parameterValue, actionedUponNodeRef));
|
||||||
|
Reference in New Issue
Block a user