diff options
4 files changed, 5 insertions, 17 deletions
diff --git a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java index 77023078..e5ef3c67 100644 --- a/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java +++ b/src/main/java/org/onap/clamp/clds/client/DcaeInventoryServices.java @@ -26,7 +26,6 @@ package org.onap.clamp.clds.client; import com.att.eelf.configuration.EELFLogger;
import com.att.eelf.configuration.EELFManager;
-import com.fasterxml.jackson.core.JsonProcessingException;
import java.io.IOException;
import java.util.Date;
@@ -83,7 +82,7 @@ public class DcaeInventoryServices { * @throws ParseException
* In case of DCAE Json parse exception
*/
- public void setEventInventory(CldsModel cldsModel, String userId) throws ParseException, InterruptedException {
+ public void setEventInventory(CldsModel cldsModel, String userId) throws InterruptedException {
String artifactName = cldsModel.getControlName();
DcaeEvent dcaeEvent = new DcaeEvent();
DcaeInventoryResponse dcaeResponse = null;
@@ -109,7 +108,7 @@ public class DcaeInventoryServices { dcaeEvent.setArtifactName(artifactName);
dcaeEvent.setEvent(DcaeEvent.EVENT_DISTRIBUTION);
LoggingUtils.setResponseContext("0", "Set inventory success", this.getClass().getName());
- } catch (JsonProcessingException e) {
+ } catch (ParseException e) {
LoggingUtils.setResponseContext("900", "Set inventory failed", this.getClass().getName());
LoggingUtils.setErrorContext("900", "Set inventory error");
logger.error("Error during JSON decoding", e);
@@ -154,8 +153,7 @@ public class DcaeInventoryServices { return totalCount.intValue();
}
- private DcaeInventoryResponse getItemsFromDcaeInventoryResponse(String responseStr)
- throws ParseException {
+ private DcaeInventoryResponse getItemsFromDcaeInventoryResponse(String responseStr) throws ParseException {
JSONParser parser = new JSONParser();
Object obj0 = parser.parse(responseStr);
JSONObject jsonObj = (JSONObject) obj0;
diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java b/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java index a9b003d4..73f95900 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsDictionary.java @@ -23,9 +23,6 @@ package org.onap.clamp.clds.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - import java.util.ArrayList; import java.util.List; @@ -34,7 +31,7 @@ import org.onap.clamp.clds.dao.CldsDao; /** * Represents a CLDS Dictionary. */ -@JsonInclude(Include.NON_NULL) + public class CldsDictionary { private String dictionaryId; diff --git a/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java b/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java index 87ba9fe8..cb051b81 100644 --- a/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java +++ b/src/main/java/org/onap/clamp/clds/model/CldsDictionaryItem.java @@ -23,9 +23,6 @@ package org.onap.clamp.clds.model; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonInclude.Include; - import java.util.List; import org.onap.clamp.clds.dao.CldsDao; @@ -33,7 +30,6 @@ import org.onap.clamp.clds.dao.CldsDao; /** * Represents a CLDS Dictionary Item. */ -@JsonInclude(Include.NON_NULL) public class CldsDictionaryItem { private String dictElementId; diff --git a/src/main/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponse.java b/src/main/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponse.java index 3b1dffa2..74582a86 100644 --- a/src/main/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponse.java +++ b/src/main/java/org/onap/clamp/clds/model/dcae/DcaeInventoryResponse.java @@ -19,17 +19,14 @@ * limitations under the License. * ============LICENSE_END============================================ * =================================================================== - * + * */ package org.onap.clamp.clds.model.dcae; -import com.fasterxml.jackson.annotation.JsonIgnoreProperties; - /** * This class maps the DCAE inventory answer to a nice pojo. */ -@JsonIgnoreProperties(ignoreUnknown = true) public class DcaeInventoryResponse { private String typeName; |