aboutsummaryrefslogtreecommitdiffstats
path: root/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
diff options
context:
space:
mode:
Diffstat (limited to 'policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java')
-rw-r--r--policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java42
1 files changed, 22 insertions, 20 deletions
diff --git a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
index 76836ba2..f008407c 100644
--- a/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
+++ b/policy-management/src/main/java/org/onap/policy/drools/protocol/configuration/PdpdConfiguration.java
@@ -165,30 +165,32 @@ public class PdpdConfiguration {
}
protected boolean declaredProperty(String name, Object value) {
- return switch (name) {
- case "requestID" -> {
+ switch (name) {
+ case "requestID":
callSetRequestId(value);
- yield true;
- }
- case "entity" -> {
+ return true;
+ case "entity":
callSetEntity(value);
- yield true;
- }
- case "controllers" -> {
+ return true;
+ case "controllers":
callSetControllers(value);
- yield true;
- }
- default -> false;
- };
+ return true;
+ default:
+ return false;
+ }
}
protected Object declaredPropertyOrNotFound(String name, Object notFoundValue) {
- return switch (name) {
- case "requestID" -> getRequestId();
- case "entity" -> getEntity();
- case "controllers" -> getControllers();
- default -> notFoundValue;
- };
+ switch (name) {
+ case "requestID":
+ return getRequestId();
+ case "entity":
+ return getEntity();
+ case "controllers":
+ return getControllers();
+ default:
+ return notFoundValue;
+ }
}
/**
@@ -240,7 +242,7 @@ public class PdpdConfiguration {
} else {
throw new IllegalArgumentException(
"property \"requestID\" is of type \"java.lang.String\", but got "
- + value.getClass().toString());
+ + value.getClass());
}
}
@@ -255,7 +257,7 @@ public class PdpdConfiguration {
} else {
throw new IllegalArgumentException(
"property \"entity\" is of type \"java.lang.String\", but got "
- + value.getClass().toString());
+ + value.getClass());
}
}