diff options
Diffstat (limited to 'catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java')
-rw-r--r-- | catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java index 763552fcf3..bca901ee8b 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java @@ -213,7 +213,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } component = getComponentEither.left().value(); Optional<InputDefinition> op = component.getInputs().stream().filter(in -> in.getUniqueId().equals(inputId)).findFirst(); - if (op.isEmpty()) { + if (!op.isPresent()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(getComponentEither.right().value()); log.debug(FAILED_TO_FOUND_INPUT_UNDER_COMPONENT_ERROR, inputId, parentId, actionStatus); return Either.right(componentsUtils.getResponseFormat(actionStatus)); @@ -369,7 +369,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } component = getComponentEither.left().value(); Optional<InputDefinition> op = component.getInputs().stream().filter(in -> in.getUniqueId().equals(inputId)).findFirst(); - if (op.isEmpty()) { + if (!op.isPresent()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(getComponentEither.right().value()); log.debug(FAILED_TO_FOUND_INPUT_UNDER_COMPONENT_ERROR, inputId, componentId, actionStatus); return Either.right(componentsUtils.getResponseFormat(actionStatus)); @@ -664,7 +664,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { filter(input -> input.getUniqueId().equals(inputId)). // Get the input findAny(); - if (optionalInput.isEmpty()) { + if (!optionalInput.isPresent()) { throw new ByActionStatusComponentException(ActionStatus.INPUT_IS_NOT_CHILD_OF_COMPONENT, inputId, componentId); } InputDefinition inputForDelete = optionalInput.get(); @@ -770,7 +770,7 @@ public class InputsBusinessLogic extends BaseBusinessLogic { } Component component = getComponentEither.left().value(); Optional<InputDefinition> op = component.getInputs().stream().filter(in -> in.getUniqueId().equals(inputId)).findFirst(); - if (op.isEmpty()) { + if (!op.isPresent()) { ActionStatus actionStatus = componentsUtils.convertFromStorageResponse(getComponentEither.right().value()); log.debug(FAILED_TO_FOUND_INPUT_UNDER_COMPONENT_ERROR, inputId, componentId, actionStatus); return Either.right(componentsUtils.getResponseFormat(actionStatus)); |