summaryrefslogtreecommitdiffstats
path: root/openstack-client-connectors/jersey2-connector/src/main
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/jersey2-connector/src/main
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/jersey2-connector/src/main')
-rw-r--r--openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/OpenStack.java43
1 files changed, 22 insertions, 21 deletions
diff --git a/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/OpenStack.java b/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/OpenStack.java
index 22ba5e4..eeedfd0 100644
--- a/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/OpenStack.java
+++ b/openstack-client-connectors/jersey2-connector/src/main/java/com/woorea/openstack/connector/OpenStack.java
@@ -25,14 +25,15 @@ import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.ext.ContextResolver;
-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 org.glassfish.jersey.SslConfigurator;
import org.glassfish.jersey.jackson.JacksonFeature;
+import com.fasterxml.jackson.annotation.JsonRootName;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
+
public class OpenStack {
public static Client CLIENT;
@@ -84,23 +85,23 @@ public class OpenStack {
CLIENT = ClientBuilder.newBuilder().sslContext(sslConfig.createSSLContext()).build();
DEFAULT_MAPPER = new ObjectMapper();
-
- DEFAULT_MAPPER.setSerializationInclusion(Inclusion.NON_NULL);
- DEFAULT_MAPPER.enable(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.enable(DeserializationConfig.Feature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
-
+
+ DEFAULT_MAPPER.setSerializationInclusion(Include.NON_NULL);
+ DEFAULT_MAPPER.enable(SerializationFeature.INDENT_OUTPUT);
+ DEFAULT_MAPPER.enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY);
+ DEFAULT_MAPPER.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+ DEFAULT_MAPPER.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
+
WRAPPED_MAPPER = new ObjectMapper();
-
- WRAPPED_MAPPER.setSerializationInclusion(Inclusion.NON_NULL);
- WRAPPED_MAPPER.enable(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.enable(DeserializationConfig.Feature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
-
+
+ WRAPPED_MAPPER.setSerializationInclusion(Include.NON_NULL);
+ WRAPPED_MAPPER.enable(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);
+ WRAPPED_MAPPER.enable(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT);
+
CLIENT.register(new JacksonFeature()).register(new ContextResolver<ObjectMapper>() {
@Override