aboutsummaryrefslogtreecommitdiffstats
path: root/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/InputsBusinessLogic.java
diff options
context:
space:
mode:
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.java8
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 bca901ee8b..763552fcf3 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.isPresent()) {
+ if (op.isEmpty()) {
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.isPresent()) {
+ if (op.isEmpty()) {
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.isPresent()) {
+ if (optionalInput.isEmpty()) {
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.isPresent()) {
+ if (op.isEmpty()) {
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));