mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed major issues reported by sonar (Simplify Boolean Expression)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/HEAD@64169 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -75,7 +75,7 @@ public class DateParameterProcessor extends ParameterProcessor implements Parame
|
||||
// strip the processor name from the value
|
||||
value = stripName(value);
|
||||
|
||||
if (value.isEmpty() == false)
|
||||
if (!value.isEmpty())
|
||||
{
|
||||
String[] values = value.split("\\.", 2);
|
||||
String field = values[0].trim();
|
||||
|
@@ -24,7 +24,7 @@ import org.springframework.extensions.surf.util.I18NUtil;
|
||||
|
||||
/**
|
||||
* Message parameter processor.
|
||||
*
|
||||
*
|
||||
* @author Roy Wetherall
|
||||
* @since 2.1
|
||||
*/
|
||||
@@ -38,10 +38,10 @@ public class MessageParameterProcessor extends ParameterProcessor
|
||||
{
|
||||
// the default position is to return the value un-changed
|
||||
String result = value;
|
||||
|
||||
|
||||
// strip the processor name from the value
|
||||
value = stripName(value);
|
||||
if (value.isEmpty() == false)
|
||||
value = stripName(value);
|
||||
if (!value.isEmpty())
|
||||
{
|
||||
result = I18NUtil.getMessage(value);
|
||||
if (result == null)
|
||||
@@ -49,7 +49,7 @@ public class MessageParameterProcessor extends ParameterProcessor
|
||||
throw new AlfrescoRuntimeException("The message parameter processor could not resolve the message for the id " + value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
@@ -119,7 +119,7 @@ public class NodeParameterProcessor extends ParameterProcessor implements Parame
|
||||
|
||||
// strip the processor name from the value
|
||||
value = stripName(value);
|
||||
if (value.isEmpty() == false)
|
||||
if (!value.isEmpty())
|
||||
{
|
||||
QName qname = QName.createQName(value, namespaceService);
|
||||
|
||||
|
@@ -151,7 +151,7 @@ public class ParameterProcessorComponent implements ParameterSubstitutionSuggest
|
||||
{
|
||||
ParameterProcessor result = null;
|
||||
|
||||
if (value != null && value.isEmpty() == false)
|
||||
if (value != null && !value.isEmpty())
|
||||
{
|
||||
String[] values = value.split("\\.", 2);
|
||||
if (values.length != 0)
|
||||
|
Reference in New Issue
Block a user