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 --- .../com/woorea/openstack/swift/model/Container.java | 2 +- .../java/com/woorea/openstack/swift/model/Object.java | 3 +-- .../com/woorea/openstack/swift/model/ContainerTest.java | 17 +++++++++-------- .../com/woorea/openstack/swift/model/ObjectTest.java | 17 ++++++++++------- 4 files changed, 21 insertions(+), 18 deletions(-) (limited to 'swift-model/src') diff --git a/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java b/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java index eb359f3..5efe9a7 100644 --- a/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java +++ b/swift-model/src/main/java/com/woorea/openstack/swift/model/Container.java @@ -18,7 +18,7 @@ package com.woorea.openstack.swift.model; import java.io.Serializable; -import org.codehaus.jackson.annotate.JsonProperty; +import com.fasterxml.jackson.annotation.JsonProperty; public class Container implements Serializable { diff --git a/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java b/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java index 1c7d1e5..cfc3eba 100644 --- a/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java +++ b/swift-model/src/main/java/com/woorea/openstack/swift/model/Object.java @@ -19,8 +19,7 @@ package com.woorea.openstack.swift.model; import java.io.Serializable; import java.util.Calendar; -import org.codehaus.jackson.annotate.JsonProperty; - +import com.fasterxml.jackson.annotation.JsonProperty; public class Object implements Serializable { diff --git a/swift-model/src/test/java/com/woorea/openstack/swift/model/ContainerTest.java b/swift-model/src/test/java/com/woorea/openstack/swift/model/ContainerTest.java index 2500ebf..41d7f6e 100644 --- a/swift-model/src/test/java/com/woorea/openstack/swift/model/ContainerTest.java +++ b/swift-model/src/test/java/com/woorea/openstack/swift/model/ContainerTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.swift.model; -import com.woorea.openstack.swift.model.Container; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; +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; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -41,9 +41,10 @@ public class ContainerTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/swift-model/src/test/java/com/woorea/openstack/swift/model/ObjectTest.java b/swift-model/src/test/java/com/woorea/openstack/swift/model/ObjectTest.java index 4cefadb..28d909a 100644 --- a/swift-model/src/test/java/com/woorea/openstack/swift/model/ObjectTest.java +++ b/swift-model/src/test/java/com/woorea/openstack/swift/model/ObjectTest.java @@ -20,11 +20,13 @@ package com.woorea.openstack.swift.model; +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; + import java.util.Calendar; -import org.codehaus.jackson.map.DeserializationConfig; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.SerializationConfig; -import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + import org.junit.Assert; import org.junit.Test; import org.skyscreamer.jsonassert.JSONAssert; @@ -44,9 +46,10 @@ public class ObjectTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { -- cgit 1.2.3-korg