From 27d3e6c2b963be95f11a9aebb12de6e5028c8cb9 Mon Sep 17 00:00:00 2001 From: sebdet Date: Tue, 11 Dec 2018 12:42:07 +0100 Subject: Reformating code Some reformating of the code Issue-ID: CLAMP-252 Change-Id: I68e011ed496b853d51d242f90b6382a624b08d92 Signed-off-by: sebdet --- .../clds/client/req/policy/GuardPolicyAttributesConstructor.java | 5 ++--- .../java/org/onap/clamp/clds/exception/BadRequestException.java | 6 +++--- 2 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/main/java/org') 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 -- cgit 1.2.3-korg