aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java')
-rw-r--r--controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java17
1 files changed, 11 insertions, 6 deletions
diff --git a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java
index 29689edf7..8341be1d3 100644
--- a/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java
+++ b/controlloop/common/controller-usecases/src/main/java/org/onap/policy/drools/apps/controller/usecases/GetTargetEntityOperation2.java
@@ -3,7 +3,7 @@
* ONAP
* ================================================================================
* Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
- * Modifications Copyright (C) 2023 Nordix Foundation.
+ * Modifications Copyright (C) 2023-2024 Nordix Foundation.
* ================================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -93,11 +93,16 @@ public class GetTargetEntityOperation2 extends OperationPartial {
throw new IllegalArgumentException("The target type is null");
}
- return switch (targetType) {
- case PNF -> detmPnfTarget();
- case VM, VNF, VFMODULE -> detmVfModuleTarget();
- default -> throw new IllegalArgumentException("The target type is not supported");
- };
+ switch (targetType) {
+ case PNF:
+ return detmPnfTarget();
+ case VM:
+ case VNF:
+ case VFMODULE:
+ return detmVfModuleTarget();
+ default:
+ throw new IllegalArgumentException("The target type is not supported");
+ }
}
/**