summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java5
-rw-r--r--src/main/java/org/onap/clamp/clds/exception/BadRequestException.java6
2 files changed, 5 insertions, 6 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java b/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
index afef5919c..f15d33df2 100644
--- a/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
+++ b/src/main/java/org/onap/clamp/clds/client/req/policy/GuardPolicyAttributesConstructor.java
@@ -35,7 +35,6 @@ import org.onap.clamp.clds.model.properties.ModelProperties;
import org.onap.clamp.clds.model.properties.PolicyChain;
import org.onap.clamp.clds.model.properties.PolicyItem;
import org.onap.policy.api.AttributeType;
-import org.onap.policy.api.RuleProvider;
public class GuardPolicyAttributesConstructor {
public static final String ACTOR = "actor";
@@ -79,10 +78,10 @@ public class GuardPolicyAttributesConstructor {
matchingAttributes.put(RECIPE, policyItem.getRecipe());
matchingAttributes.put(TARGETS, policyItem.getGuardTargets());
matchingAttributes.put(CLNAME, modelProp.getControlNameAndPolicyUniqueId());
- if (RuleProvider.GUARD_MIN_MAX.equals(RuleProvider.valueOf(policyItem.getGuardPolicyType()))) {
+ if ("GUARD_MIN_MAX".equals(policyItem.getGuardPolicyType())) {
matchingAttributes.put(MIN, policyItem.getMinGuard());
matchingAttributes.put(MAX, policyItem.getMaxGuard());
- } else if (RuleProvider.GUARD_YAML.equals(RuleProvider.valueOf(policyItem.getGuardPolicyType()))) {
+ } else if ("GUARD_YAML".equals(policyItem.getGuardPolicyType())) {
matchingAttributes.put(LIMIT, policyItem.getLimitGuard());
matchingAttributes.put(TIME_WINDOW, policyItem.getTimeWindowGuard());
matchingAttributes.put(TIME_UNITS, policyItem.getTimeUnitsGuard());
diff --git a/src/main/java/org/onap/clamp/clds/exception/BadRequestException.java b/src/main/java/org/onap/clamp/clds/exception/BadRequestException.java
index 14d14a44d..c6b0d5556 100644
--- a/src/main/java/org/onap/clamp/clds/exception/BadRequestException.java
+++ b/src/main/java/org/onap/clamp/clds/exception/BadRequestException.java
@@ -47,9 +47,9 @@ public class BadRequestException extends RuntimeException {
}
/**
- * This constructor can be used to create a new CldsConfigException. Use
- * this constructor only if you are creating a new exception stack, not if
- * an exception was already raised by another code.
+ * This constructor can be used to create a new CldsConfigException. Use this
+ * constructor only if you are creating a new exception stack, not if an
+ * exception was already raised by another code.
*
* @param message
* A string message detailing the problem