diff options
Diffstat (limited to 'models-interactions/model-yaml/src/main')
9 files changed, 13 insertions, 20 deletions
diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java index e726576db..0bfc9062a 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java @@ -200,7 +200,7 @@ public class ControlLoopCompiler implements Serializable { // // They really shouldn't have any policies attached. // - if ((policy.getPolicies() != null || policy.getPolicies().isEmpty()) && callback != null ) { + if ((policy.getPolicies() != null || policy.getPolicies().isEmpty()) && callback != null) { callback.onWarning("Open Loop policy contains policies. The policies will never be invoked."); } } @@ -299,7 +299,7 @@ public class ControlLoopCompiler implements Serializable { if (LOGGER.isDebugEnabled()) { LOGGER.info("Trigger Node {}", node); } - if (graph.inDegreeOf(node) > 0 ) { + if (graph.inDegreeOf(node) > 0) { // // Really should NEVER get here unless someone messed up the code above. // @@ -353,10 +353,10 @@ public class ControlLoopCompiler implements Serializable { if (! isRecipeOk(operPolicy, callback)) { isOk = false; } - if (! isTargetOk(operPolicy, callback) ) { + if (! isTargetOk(operPolicy, callback)) { isOk = false; } - if (! arePolicyResultsOk(operPolicy, callback) ) { + if (! arePolicyResultsOk(operPolicy, callback)) { isOk = false; } return isOk; @@ -434,19 +434,19 @@ public class ControlLoopCompiler implements Serializable { // Check that policy results are connected to either default final * or another policy // boolean isOk = isSuccessPolicyResultOk(operPolicy, callback); - if (! isFailurePolicyResultOk(operPolicy, callback) ) { + if (! isFailurePolicyResultOk(operPolicy, callback)) { isOk = false; } - if (! isFailureRetriesPolicyResultOk(operPolicy, callback) ) { + if (! isFailureRetriesPolicyResultOk(operPolicy, callback)) { isOk = false; } - if (! isFailureTimeoutPolicyResultOk(operPolicy, callback) ) { + if (! isFailureTimeoutPolicyResultOk(operPolicy, callback)) { isOk = false; } - if (! isFailureExceptionPolicyResultOk(operPolicy, callback) ) { + if (! isFailureExceptionPolicyResultOk(operPolicy, callback)) { isOk = false; } - if (! isFailureGuardPolicyResultOk(operPolicy, callback) ) { + if (! isFailureGuardPolicyResultOk(operPolicy, callback)) { isOk = false; } return isOk; diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/guard/compiler/ControlLoopGuardCompiler.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/guard/compiler/ControlLoopGuardCompiler.java index 435963a9e..6f49f6a44 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/guard/compiler/ControlLoopGuardCompiler.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/guard/compiler/ControlLoopGuardCompiler.java @@ -22,11 +22,9 @@ package org.onap.policy.controlloop.guard.compiler; import java.io.InputStream; - import java.util.HashSet; import java.util.List; import java.util.Set; - import org.onap.policy.controlloop.compiler.CompilerException; import org.onap.policy.controlloop.compiler.ControlLoopCompilerCallback; import org.onap.policy.controlloop.policy.guard.Constraint; diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java index 95494d8e9..256f8be4e 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java @@ -24,7 +24,6 @@ package org.onap.policy.controlloop.policy; import java.io.Serializable; import java.util.LinkedList; import java.util.List; - import org.onap.aai.domain.yang.Pnf; import org.onap.policy.sdc.Resource; import org.onap.policy.sdc.Service; diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java index 728733d76..7a64f2fae 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java @@ -336,7 +336,7 @@ public class Policy implements Serializable { } private boolean equalsMayBeNull(final Object obj1, final Object obj2) { - if ( obj1 == null ) { + if (obj1 == null) { return obj2 == null; } return obj1.equals(obj2); diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java index 47f6f1494..c4b2cd4ca 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java @@ -22,10 +22,8 @@ package org.onap.policy.controlloop.policy.builder.impl; import com.google.common.base.Strings; - import java.util.LinkedList; import java.util.UUID; - import org.onap.aai.domain.yang.Pnf; import org.onap.policy.controlloop.compiler.CompilerException; import org.onap.policy.controlloop.compiler.ControlLoopCompiler; diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ResultsImpl.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ResultsImpl.java index 561f55170..aac4b068f 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ResultsImpl.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ResultsImpl.java @@ -23,7 +23,6 @@ package org.onap.policy.controlloop.policy.builder.impl; import java.util.LinkedList; import java.util.List; - import org.onap.policy.controlloop.policy.builder.Message; import org.onap.policy.controlloop.policy.builder.Results; diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java index b16ecbb55..ab87b16eb 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java @@ -29,7 +29,7 @@ import java.util.Map; public class Constraint { private Integer freqLimitPerTarget; - private Map<String,String> timeWindow; + private Map<String, String> timeWindow; private Map<String, String> activeTimeRange; private Integer minVnfCount; private Integer maxVnfCount; diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java index 55b96e14e..5ad052b3b 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java @@ -179,7 +179,7 @@ public class GuardPolicy { } private boolean equalsMayBeNull(final Object obj1, final Object obj2) { - if ( obj1 == null ) { + if (obj1 == null) { return obj2 == null; } return obj1.equals(obj2); diff --git a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java index 70d23bcba..50f5086aa 100644 --- a/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java +++ b/models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java @@ -22,7 +22,6 @@ package org.onap.policy.controlloop.policy.guard.builder.impl; import java.util.LinkedList; - import org.onap.policy.controlloop.compiler.CompilerException; import org.onap.policy.controlloop.compiler.ControlLoopCompilerCallback; import org.onap.policy.controlloop.guard.compiler.ControlLoopGuardCompiler; @@ -105,7 +104,7 @@ public class ControlLoopGuardBuilderImpl implements ControlLoopGuardBuilder { if (constraints == null) { throw new BuilderException("Constraint much not be null"); } - if (!addLimitConstraints(id,constraints)) { + if (!addLimitConstraints(id, constraints)) { throw new BuilderException(NO_EXISTING_GUARD_POLICY_MATCHING_THE_ID + id); } return this; |