diff options
Diffstat (limited to 'src/main/java')
7 files changed, 19 insertions, 3 deletions
diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java b/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java index 013dc66..5863bd8 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/CommonEventHeader.java @@ -21,6 +21,9 @@ package org.onap.dcaegen2.services.sonhms; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties(ignoreUnknown = true) public class CommonEventHeader { private String version; diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java b/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java index 3a71f2b..7338911 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/Event.java @@ -21,6 +21,9 @@ package org.onap.dcaegen2.services.sonhms; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties(ignoreUnknown = true) public class Event { private CommonEventHeader commonEventHeader; private FaultFields faultFields; diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java b/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java index a2c877d..e95d38e 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/FaultFields.java @@ -21,6 +21,9 @@ package org.onap.dcaegen2.services.sonhms; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + +@JsonIgnoreProperties(ignoreUnknown = true) public class FaultFields { @Override diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java b/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java index 3860311..12113ce 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/dmaap/NotificationConsumer.java @@ -23,8 +23,6 @@ package org.onap.dcaegen2.services.sonhms.dmaap; import com.att.nsa.cambria.client.CambriaConsumer; -import java.io.IOException; - import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -51,7 +49,7 @@ public class NotificationConsumer implements Runnable { log.debug(msg); notificationCallback.activateCallBack(msg); } - } catch (IOException e) { + } catch (Exception e) { log.debug("exception when fetching msgs from dmaap", e); } diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java b/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java index c55c6d6..f71df00 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/model/AdditionalMeasurements.java @@ -21,8 +21,11 @@ package org.onap.dcaegen2.services.sonhms.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + import java.util.Map; +@JsonIgnoreProperties(ignoreUnknown = true) public class AdditionalMeasurements { String name; diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java b/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java index 73edc39..e6a1869 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/model/Event.java @@ -21,8 +21,11 @@ package org.onap.dcaegen2.services.sonhms.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + import org.onap.dcaegen2.services.sonhms.CommonEventHeader; +@JsonIgnoreProperties(ignoreUnknown = true) public class Event { CommonEventHeader commonEventHeader; MeasurementFields measurementFields; diff --git a/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java b/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java index 477a2d3..fea6271 100644 --- a/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java +++ b/src/main/java/org/onap/dcaegen2/services/sonhms/model/MeasurementFields.java @@ -21,8 +21,11 @@ package org.onap.dcaegen2.services.sonhms.model; +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; + import java.util.List; +@JsonIgnoreProperties(ignoreUnknown = true) public class MeasurementFields { String measurementInterval; |