From 69135296d0c23ad73efb813e56da65cf309c5986 Mon Sep 17 00:00:00 2001 From: Rob Daugherty Date: Tue, 11 Sep 2018 11:39:12 -0400 Subject: Use fasterxml jackson implementation in so/libs NexusIQ issue: org.codehaus.jackson This commit changes so/libs from the old codehaus jackson implementation to the fasterxml implementation. 2.8.10 is the latest version compatible with the 1.5.13.RELEASE springboot version used in SO. Change-Id: I3b1167dd0efeb3463efb7e01fac26d0f312d7aad Issue-ID: SO-864 Signed-off-by: Rob Daugherty --- .../openstack/connector/HttpClientConnector.java | 34 +++++++++++----------- .../openstack/connector/HttpClientResponse.java | 4 +-- 2 files changed, 19 insertions(+), 19 deletions(-) (limited to 'openstack-client-connectors/http-connector/src/main') diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java index 02d851e..85ac96c 100644 --- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java +++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java @@ -2,7 +2,7 @@ * ONAP-SO * ============LICENSE_START========================================== * =================================================================== - * Copyright � 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -47,13 +47,13 @@ import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClients; import org.apache.log4j.Logger; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonRootName; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonRootName; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import com.woorea.openstack.base.client.OpenStackClientConnector; import com.woorea.openstack.base.client.OpenStackConnectException; import com.woorea.openstack.base.client.OpenStackRequest; @@ -70,19 +70,19 @@ public class HttpClientConnector implements OpenStackClientConnector { static { DEFAULT_MAPPER = new ObjectMapper(); - DEFAULT_MAPPER.setSerializationInclusion(Inclusion.NON_NULL); - DEFAULT_MAPPER.disable(SerializationConfig.Feature.INDENT_OUTPUT); - DEFAULT_MAPPER.enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); - DEFAULT_MAPPER.disable(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES); + DEFAULT_MAPPER.setSerializationInclusion(Include.NON_NULL); + DEFAULT_MAPPER.disable(SerializationFeature.INDENT_OUTPUT); + DEFAULT_MAPPER.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + DEFAULT_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); WRAPPED_MAPPER = new ObjectMapper(); - WRAPPED_MAPPER.setSerializationInclusion(Inclusion.NON_NULL); - WRAPPED_MAPPER.disable(SerializationConfig.Feature.INDENT_OUTPUT); - WRAPPED_MAPPER.enable(SerializationConfig.Feature.WRAP_ROOT_VALUE); - WRAPPED_MAPPER.enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE); - WRAPPED_MAPPER.enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); - WRAPPED_MAPPER.disable(DeserializationConfig.Feature.FAIL_ON_UNKNOWN_PROPERTIES); + WRAPPED_MAPPER.setSerializationInclusion(Include.NON_NULL); + WRAPPED_MAPPER.disable(SerializationFeature.INDENT_OUTPUT); + WRAPPED_MAPPER.enable(SerializationFeature.WRAP_ROOT_VALUE); + WRAPPED_MAPPER.enable(DeserializationFeature.UNWRAP_ROOT_VALUE); + WRAPPED_MAPPER.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + WRAPPED_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES); } protected static ObjectMapper getObjectMapper (Class type) { diff --git a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java index 108861a..711d4e5 100644 --- a/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java +++ b/openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java @@ -17,7 +17,7 @@ /* * ============LICENSE_START========================================== * =================================================================== - * Copyright © 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (c) 2017 AT&T Intellectual Property. All rights reserved. * =================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -42,8 +42,8 @@ package com.woorea.openstack.connector; import org.apache.http.Header; import org.apache.http.HttpResponse; import org.apache.log4j.Logger; -import org.codehaus.jackson.map.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectMapper; import com.woorea.openstack.base.client.OpenStackResponse; import java.io.ByteArrayInputStream; -- cgit 1.2.3-korg