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(); NodeRef nodeRef = params.getNodeRef();
int maxEntries = params.getMaxEntries(); int maxEntries = params.getMaxEntries();
// Reverse order if the results are limited // Reverse order if the results are limited
boolean forward = maxEntries > 0 ? false : true; boolean forward = maxEntries <= 0;
// start the audit trail report // start the audit trail report
writeAuditTrailHeader(writer, params, reportFormat); writeAuditTrailHeader(writer, params, reportFormat);

View File

@@ -226,7 +226,7 @@ public class RecordCategoryType extends BaseBehaviourBean
@Override @Override
public boolean getMustCopy(QName classQName, CopyDetails copyDetails) 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) if (constraintRef == null)
{ {
result = rmAdminService.removeCustomPropertyDefinitionConstraints(propQName); result = rmAdminService.removeCustomPropertyDefinitionConstraints(propQName);
updated = constraints.isEmpty() ? false : true; updated = !constraints.isEmpty();
} }
else else
{ {

View File

@@ -533,7 +533,7 @@ public class ApiNodesModelFactory
if (includeParam.contains(RMNode.PARAM_HAS_RETENTION_SCHEDULE)) if (includeParam.contains(RMNode.PARAM_HAS_RETENTION_SCHEDULE))
{ {
DispositionSchedule ds = dispositionService.getDispositionSchedule(info.getNodeRef()); 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))) 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)) if (parameters.getInclude().contains(RMNode.PARAM_HAS_RETENTION_SCHEDULE))
{ {
DispositionSchedule ds = dispositionService.getDispositionSchedule(info.getNodeRef()); DispositionSchedule ds = dispositionService.getDispositionSchedule(info.getNodeRef());
recordCategory.setHasRetentionSchedule(ds !=null ? true : false); recordCategory.setHasRetentionSchedule(ds != null);
} }
return recordCategory; return recordCategory;

View File

@@ -145,11 +145,11 @@ public class CustomEMailMappingServiceImplTest extends BaseRMTestCase
private boolean checkCustomMappingsSize(int expected) private boolean checkCustomMappingsSize(int expected)
{ {
return expected == eMailMappingService.getCustomMappings().size() ? true : false; return expected == eMailMappingService.getCustomMappings().size();
} }
private boolean checkEmailMappingKeysSize(int expected) private boolean checkEmailMappingKeysSize(int expected)
{ {
return expected == eMailMappingService.getEmailMappingKeys().size() ? true : false; return expected == eMailMappingService.getEmailMappingKeys().size();
} }
} }