summaryrefslogtreecommitdiffstats
path: root/controlloop/common/model-impl/events/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/model-impl/events/src/main')
-rw-r--r--controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java3
-rw-r--r--controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java3
-rw-r--r--controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java36
3 files changed, 18 insertions, 24 deletions
diff --git a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
index 4cae5ca5d..9cb85ae7f 100644
--- a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
+++ b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopEvent.java
@@ -32,8 +32,5 @@ public class PhysicalControlLoopEvent extends ControlLoopEvent {
*/
public PhysicalControlLoopEvent(PhysicalControlLoopEvent event) {
super(event);
- if (event == null) {
- return;
- }
}
}
diff --git a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
index 5dbc7f498..0b5db3a1f 100644
--- a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
+++ b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/PhysicalControlLoopNotification.java
@@ -32,9 +32,6 @@ public class PhysicalControlLoopNotification extends ControlLoopNotification {
*/
public PhysicalControlLoopNotification(PhysicalControlLoopEvent event) {
super(event);
- if (event == null) {
- return;
- }
}
}
diff --git a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
index 864b31726..4bbab7a50 100644
--- a/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
+++ b/controlloop/common/model-impl/events/src/main/java/org/onap/policy/controlloop/util/Serialization.java
@@ -40,6 +40,24 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public final class Serialization {
+ public static final Gson gson =
+ new GsonBuilder().disableHtmlEscaping().registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+ .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+ .registerTypeAdapter(ControlLoopNotificationType.class, new NotificationTypeAdapter())
+ .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
+
+
+ public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+ .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+ .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+ .registerTypeAdapter(ControlLoopNotificationType.class, new NotificationTypeAdapter())
+ .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
+
+ public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
+ .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
+ .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
+ .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
+
private Serialization() {}
public static class NotificationTypeAdapter
@@ -104,22 +122,4 @@ public final class Serialization {
}
- public static final Gson gson =
- new GsonBuilder().disableHtmlEscaping().registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
- .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
- .registerTypeAdapter(ControlLoopNotificationType.class, new NotificationTypeAdapter())
- .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
-
-
- public static final Gson gsonPretty = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
- .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
- .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
- .registerTypeAdapter(ControlLoopNotificationType.class, new NotificationTypeAdapter())
- .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
-
- public static final Gson gsonJunit = new GsonBuilder().disableHtmlEscaping().setPrettyPrinting()
- .registerTypeAdapter(ZonedDateTime.class, new GsonUtcAdapter())
- .registerTypeAdapter(Instant.class, new GsonInstantAdapter())
- .registerTypeAdapter(ControlLoopTargetType.class, new TargetTypeAdapter()).create();
-
}