Removed redundant conditional expression

This commit is contained in:
cagache
2019-07-01 16:34:24 +03:00
parent c5907dbc10
commit 723183021a
5 changed files with 7 additions and 7 deletions

View File

@@ -1072,7 +1072,7 @@ public class RecordsManagementAuditServiceImpl extends AbstractLifecycleBean
NodeRef nodeRef = params.getNodeRef();
int maxEntries = params.getMaxEntries();
// Reverse order if the results are limited
boolean forward = maxEntries > 0 ? false : true;
boolean forward = maxEntries <= 0;
// start the audit trail report
writeAuditTrailHeader(writer, params, reportFormat);

View File

@@ -226,7 +226,7 @@ public class RecordCategoryType extends BaseBehaviourBean
@Override
public boolean getMustCopy(QName classQName, CopyDetails copyDetails)
{
return nodeService.getType(copyDetails.getTargetParentNodeRef()).equals(TYPE_RECORD_FOLDER) ? false : true;
return !nodeService.getType(copyDetails.getTargetParentNodeRef()).equals(TYPE_RECORD_FOLDER);
}
};
}

View File

@@ -161,7 +161,7 @@ public class CustomPropertyDefinitionPut extends BaseCustomPropertyWebScript
if (constraintRef == null)
{
result = rmAdminService.removeCustomPropertyDefinitionConstraints(propQName);
updated = constraints.isEmpty() ? false : true;
updated = !constraints.isEmpty();
}
else
{

View File

@@ -533,7 +533,7 @@ public class ApiNodesModelFactory
if (includeParam.contains(RMNode.PARAM_HAS_RETENTION_SCHEDULE))
{
DispositionSchedule ds = dispositionService.getDispositionSchedule(info.getNodeRef());
recordCategoryChild.setHasRetentionSchedule(ds !=null ? true : false);
recordCategoryChild.setHasRetentionSchedule(ds != null);
}
if((!isMinimalInfo && propertyFilter.isAllowed(RMNode.PARAM_IS_CLOSED)) || (isMinimalInfo && includeParam.contains(RMNode.PARAM_IS_CLOSED)))
{
@@ -673,7 +673,7 @@ public class ApiNodesModelFactory
if (parameters.getInclude().contains(RMNode.PARAM_HAS_RETENTION_SCHEDULE))
{
DispositionSchedule ds = dispositionService.getDispositionSchedule(info.getNodeRef());
recordCategory.setHasRetentionSchedule(ds !=null ? true : false);
recordCategory.setHasRetentionSchedule(ds != null);
}
return recordCategory;