From 35c04a15d76d002d5cbc719dc855a15c4a84b962 Mon Sep 17 00:00:00 2001 From: Pamela Dragosh Date: Fri, 15 Sep 2017 17:05:44 -0400 Subject: Fix sonar critical Last transient/serializable issues. Throw a dedicated exception for DateUtil class Unused imports Make the enclosing method "static" or remove this set. Issue-ID: POLICY-115 Change-Id: I366f85922c4d4d290b320e0b88678c805de59872 Signed-off-by: Pamela Dragosh --- .../aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java | 7 ++++++- .../aai/src/main/java/org/onap/policy/aai/RelationshipData.java | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'controlloop/common/model-impl') diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java index 12e80d50e..2f8acf697 100644 --- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelatedToProperty.java @@ -20,13 +20,18 @@ package org.onap.policy.aai; +import java.io.Serializable; import java.util.LinkedList; import java.util.List; import com.google.gson.annotations.SerializedName; -public class RelatedToProperty { +public class RelatedToProperty implements Serializable { + /** + * + */ + private static final long serialVersionUID = 2088088164920423658L; @SerializedName("related-to-property") public List relatedTo = new LinkedList(); diff --git a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java index e5bc05599..2ad373104 100644 --- a/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java +++ b/controlloop/common/model-impl/aai/src/main/java/org/onap/policy/aai/RelationshipData.java @@ -21,12 +21,17 @@ package org.onap.policy.aai; import java.util.List; +import java.io.Serializable; import java.util.LinkedList; import com.google.gson.annotations.SerializedName; -public class RelationshipData { +public class RelationshipData implements Serializable { + /** + * + */ + private static final long serialVersionUID = 6809180843309562121L; @SerializedName("relationship-data") public List relationshipData = new LinkedList<>(); -- cgit 1.2.3-korg