aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-09-15 18:58:52 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-15 18:58:52 +0000
commitfb0b6e85027a345c23cb37ae74b23d3a8166627e (patch)
tree9f68af587d119c5079f464d497382596348f90bf /controlloop/common/model-impl
parent17ee357ac4efbc9b6bb0fbb39bc1e736e5ae9f42 (diff)
parent23808f02e323e745df5749b770cba02fd5c0bfc8 (diff)
Merge "Fix sonar criticals"
Diffstat (limited to 'controlloop/common/model-impl')
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java1
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java9
-rw-r--r--controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java9
-rw-r--r--controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java1
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java1
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java1
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java1
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java1
-rw-r--r--controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java1
-rw-r--r--controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java15
10 files changed, 22 insertions, 18 deletions
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java
index 9cb0a220a..00f62cf10 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/AAINQF199/AAINQF199Manager.java
@@ -105,6 +105,7 @@ public final class AAINQF199Manager {
Thread.sleep(1000);
} catch (InterruptedException e) {
logger.error(e.getMessage());
+ Thread.currentThread().interrupt();
}
}
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java
index 7b5bcafa7..d455bcf48 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToPropertyItem.java
@@ -20,10 +20,17 @@
package org.onap.policy.aai;
+import java.io.Serializable;
+
import com.google.gson.annotations.SerializedName;
-public class RelatedToPropertyItem {
+public class RelatedToPropertyItem implements Serializable {
+ /**
+ *
+ */
+ private static final long serialVersionUID = 5644372985092588637L;
+
@SerializedName("property-key")
public String propertyKey;
@SerializedName("property-value")
diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
index 8ceb067b1..029a4b823 100644
--- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
+++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/Relationship.java
@@ -20,9 +20,16 @@
package org.onap.policy.aai;
+import java.io.Serializable;
+
import com.google.gson.annotations.SerializedName;
-public class Relationship {
+public class Relationship implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -68508443869003054L;
@SerializedName("related-to")
public String relatedTo;
diff --git a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java
index 86ade6db7..f967414c1 100644
--- a/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java
+++ b/controlloop/common/model-impl/so/src/main/java/org/onap/policy/so/SOManager.java
@@ -107,6 +107,7 @@ public final class SOManager {
logger.error("Failed to deserialize into SOResponse: ", e);
} catch (InterruptedException e) {
logger.error("Interrupted exception: ", e);
+ Thread.currentThread().interrupt();
}
}
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java
index b2535e3af..144b97133 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealActionVmInfo.java
@@ -19,7 +19,6 @@
package org.onap.policy.vfc;
import java.io.Serializable;
-import java.time.LocalDateTime;
import com.google.gson.annotations.SerializedName;
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java
index a65ad8aac..a4647cb9f 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealAdditionalParams.java
@@ -19,7 +19,6 @@
package org.onap.policy.vfc;
import java.io.Serializable;
-import java.time.LocalDateTime;
import com.google.gson.annotations.SerializedName;
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java
index f7fc891c0..a19f72bce 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCHealRequest.java
@@ -19,7 +19,6 @@
package org.onap.policy.vfc;
import java.io.Serializable;
-import java.time.LocalDateTime;
import com.google.gson.annotations.SerializedName;
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
index 6777353a8..a225f2d71 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCManager.java
@@ -107,6 +107,7 @@ public final class VFCManager implements Runnable {
logger.error("Failed to deserialize into VFCResponse {}",e.getLocalizedMessage(),e);
} catch (InterruptedException e) {
logger.error("Interrupted exception: {}", e.getLocalizedMessage(), e);
+ Thread.currentThread().interrupt();
}
} else {
logger.warn("VFC Heal Restcall failed");
diff --git a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java
index a45a62dfa..9e3a77a2b 100644
--- a/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java
+++ b/controlloop/common/model-impl/vfc/src/main/java/org/onap/policy/vfc/VFCRequest.java
@@ -19,7 +19,6 @@
package org.onap.policy.vfc;
import java.io.Serializable;
-import java.time.LocalDateTime;
import com.google.gson.annotations.SerializedName;
diff --git a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java
index 2bdb650ba..fd59325d0 100644
--- a/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java
+++ b/controlloop/common/model-impl/vfc/src/test/java/org/onap/policy/vfc/TestDemo.java
@@ -18,19 +18,10 @@
package org.onap.policy.vfc;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.onap.policy.vfc.VFCRequest;
-import org.onap.policy.vfc.VFCHealRequest;
-import org.onap.policy.vfc.VFCHealAdditionalParams;
-import org.onap.policy.vfc.VFCHealActionVmInfo;
-import org.onap.policy.vfc.VFCResponse;
-import org.onap.policy.vfc.VFCResponseDescriptor;
+import java.util.LinkedList;
+
import org.junit.Test;
import org.onap.policy.vfc.util.Serialization;
-import java.util.LinkedList;
-import java.util.List;
public class TestDemo {
@@ -75,7 +66,7 @@ public class TestDemo {
responseDescriptor.errorCode = null;
responseDescriptor.responseId = "11";
- response.responseDescriptor.responseHistoryList = new LinkedList();
+ response.responseDescriptor.responseHistoryList = new LinkedList<>();
response.responseDescriptor.responseHistoryList.add(responseDescriptor);
body = Serialization.gsonPretty.toJson(response);