summaryrefslogtreecommitdiffstats
path: root/controlloop/common/policy-yaml
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-10-02 09:50:57 -0400
committerPamela Dragosh <pdragosh@research.att.com>2018-10-02 19:35:18 -0400
commit8c87163466a4eb5a010a9977adf8a365faec8631 (patch)
treea8c8da5e692c78e90862fcabdf805aa4aac36231 /controlloop/common/policy-yaml
parent1b34e893a66f6a7887d095b563ea17f97ab487a0 (diff)
Fixing sonar issues
Some trivial functional interface and ordering. Added some missing JUnit tests. Issue-ID: POLICY-1129 Change-Id: Iad6fe757a40819ca39e007b41dae1bf4b3f6cc0c Signed-off-by: Pamela Dragosh <pdragosh@research.att.com>
Diffstat (limited to 'controlloop/common/policy-yaml')
-rw-r--r--controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java48
1 files changed, 24 insertions, 24 deletions
diff --git a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java
index 19cca8c82..b924c2d14 100644
--- a/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java
+++ b/controlloop/common/policy-yaml/src/main/java/org/onap/policy/controlloop/policy/ControlLoop.java
@@ -46,6 +46,30 @@ public class ControlLoop implements Serializable {
// Empty Constructor.
}
+ /**
+ * Constructor.
+ *
+ * @param controlLoop copy object
+ */
+ public ControlLoop(ControlLoop controlLoop) {
+ this.controlLoopName = controlLoop.controlLoopName;
+ this.services = new LinkedList<>();
+ if (controlLoop.services != null) {
+ for (Service service : controlLoop.services) {
+ this.services.add(service);
+ }
+ }
+ this.resources = new LinkedList<>();
+ if (controlLoop.resources != null) {
+ for (Resource resource : controlLoop.resources) {
+ this.resources.add(resource);
+ }
+ }
+ this.triggerPolicy = controlLoop.triggerPolicy;
+ this.timeout = controlLoop.timeout;
+ this.abatement = controlLoop.abatement;
+ }
+
public static String getCompilerVersion() {
return ControlLoop.COMPILER_VERSION;
}
@@ -114,30 +138,6 @@ public class ControlLoop implements Serializable {
this.pnf = pnf;
}
- /**
- * Constructor.
- *
- * @param controlLoop copy object
- */
- public ControlLoop(ControlLoop controlLoop) {
- this.controlLoopName = controlLoop.controlLoopName;
- this.services = new LinkedList<>();
- if (controlLoop.services != null) {
- for (Service service : controlLoop.services) {
- this.services.add(service);
- }
- }
- this.resources = new LinkedList<>();
- if (controlLoop.resources != null) {
- for (Resource resource : controlLoop.resources) {
- this.resources.add(resource);
- }
- }
- this.triggerPolicy = controlLoop.triggerPolicy;
- this.timeout = controlLoop.timeout;
- this.abatement = controlLoop.abatement;
- }
-
@Override
public String toString() {
return "ControlLoop [controlLoopName=" + controlLoopName + ", version=" + version + ", services=" + services