summaryrefslogtreecommitdiffstats
path: root/openstack-client-connectors/http-connector
diff options
context:
space:
mode:
authorRob Daugherty <rd472p@att.com>2018-09-11 11:39:12 -0400
committerRob Daugherty <rd472p@att.com>2018-09-11 11:42:19 -0400
commit69135296d0c23ad73efb813e56da65cf309c5986 (patch)
treeb29823f2c0b978327d892e87c844dcd2d28acc72 /openstack-client-connectors/http-connector
parent7f05d1c3f153e89fa78c2bb97b950e42f6b30b38 (diff)
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 <rd472p@att.com>
Diffstat (limited to 'openstack-client-connectors/http-connector')
-rw-r--r--openstack-client-connectors/http-connector/pom.xml5
-rw-r--r--openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientConnector.java34
-rw-r--r--openstack-client-connectors/http-connector/src/main/java/com/woorea/openstack/connector/HttpClientResponse.java4
3 files changed, 19 insertions, 24 deletions
diff --git a/openstack-client-connectors/http-connector/pom.xml b/openstack-client-connectors/http-connector/pom.xml
index 095cf6d..e359300 100644
--- a/openstack-client-connectors/http-connector/pom.xml
+++ b/openstack-client-connectors/http-connector/pom.xml
@@ -21,11 +21,6 @@
<artifactId>httpcore</artifactId>
</dependency>
<dependency>
- <groupId>org.codehaus.jackson</groupId>
- <artifactId>jackson-mapper-asl</artifactId>
- <version>1.9.13</version>
- </dependency>
- <dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
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 <T> ObjectMapper getObjectMapper (Class<T> 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;