summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-yaml
diff options
context:
space:
mode:
authorRam Krishna Verma <ram_krishna.verma@bell.ca>2020-06-19 21:19:30 +0000
committerGerrit Code Review <gerrit@onap.org>2020-06-19 21:19:30 +0000
commitce850be00732359bb04d8dd3666a1293dbf8f1ff (patch)
tree672ebff060b17e1d3f7a1301a987999fe0f8688e /models-interactions/model-yaml
parentf8da89aa52f2fd39d6f2e9150ff29e4ccf8587b9 (diff)
parent9c5d23395918a739b591667edd77e3ced9cd4bfb (diff)
Merge "Changes for Checkstyle 8.32"
Diffstat (limited to 'models-interactions/model-yaml')
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/compiler/ControlLoopCompiler.java18
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/guard/compiler/ControlLoopGuardCompiler.java2
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java1
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/Policy.java2
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ControlLoopPolicyBuilderImpl.java2
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/builder/impl/ResultsImpl.java1
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/Constraint.java2
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/GuardPolicy.java2
-rw-r--r--models-interactions/model-yaml/src/main/java/org/onap/policy/controlloop/policy/guard/builder/impl/ControlLoopGuardBuilderImpl.java3
-rw-r--r--models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/compiler/ControlLoopCompilerTest.java1
-rw-r--r--models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java1
-rw-r--r--models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java1
-rw-r--r--models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopTest.java2
-rw-r--r--models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ConstraintTest.java1
-rw-r--r--models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/GuardPolicyTest.java1
15 files changed, 13 insertions, 27 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;
diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/compiler/ControlLoopCompilerTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/compiler/ControlLoopCompilerTest.java
index 98c00eb2f..71d67f07b 100644
--- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/compiler/ControlLoopCompilerTest.java
+++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/compiler/ControlLoopCompilerTest.java
@@ -31,7 +31,6 @@ import java.io.FileInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Test;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.onap.policy.controlloop.policy.FinalResult;
diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java
index 81520b578..86823400c 100644
--- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java
+++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyBuilderTest.java
@@ -32,7 +32,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.util.UUID;
-
import org.junit.Ignore;
import org.junit.Test;
import org.onap.aai.domain.yang.Pnf;
diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java
index 43428c6f9..71a80dbf7 100644
--- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java
+++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java
@@ -26,7 +26,6 @@ import static org.junit.Assert.assertNotNull;
import java.io.FileInputStream;
import java.io.InputStreamReader;
-
import org.junit.Test;
import org.onap.policy.common.utils.coder.YamlJsonTranslator;
import org.slf4j.Logger;
diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopTest.java
index c0131f506..f247baa0c 100644
--- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopTest.java
+++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopTest.java
@@ -27,10 +27,8 @@ import static org.junit.Assert.assertTrue;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-
import org.junit.Ignore;
import org.junit.Test;
-
import org.onap.aai.domain.yang.Pnf;
import org.onap.policy.common.utils.io.Serializer;
import org.onap.policy.sdc.Resource;
diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ConstraintTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ConstraintTest.java
index e0e6e9772..973caf9b4 100644
--- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ConstraintTest.java
+++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ConstraintTest.java
@@ -29,7 +29,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-
import org.junit.Test;
public class ConstraintTest {
diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/GuardPolicyTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/GuardPolicyTest.java
index 7599dcf31..9bdcd6062 100644
--- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/GuardPolicyTest.java
+++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/GuardPolicyTest.java
@@ -28,7 +28,6 @@ import static org.junit.Assert.assertTrue;
import java.util.LinkedList;
import java.util.List;
-
import org.junit.Test;
public class GuardPolicyTest {