diff options
author | Rob Daugherty <rd472p@att.com> | 2018-09-11 11:39:12 -0400 |
---|---|---|
committer | Rob Daugherty <rd472p@att.com> | 2018-09-11 11:42:19 -0400 |
commit | 69135296d0c23ad73efb813e56da65cf309c5986 (patch) | |
tree | b29823f2c0b978327d892e87c844dcd2d28acc72 /heat-model/src/test/java/com | |
parent | 7f05d1c3f153e89fa78c2bb97b950e42f6b30b38 (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 'heat-model/src/test/java/com')
10 files changed, 99 insertions, 87 deletions
diff --git a/heat-model/src/test/java/com/woorea/openstack/heat/model/CreateStackParamTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/CreateStackParamTest.java index f181175..a57eced 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/CreateStackParamTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/CreateStackParamTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.CreateStackParam; +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.Map; -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; @@ -53,9 +54,10 @@ public class CreateStackParamTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/ErrorTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/ErrorTest.java index 76582e7..084fd26 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/ErrorTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/ErrorTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.heat.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 com.woorea.openstack.heat.model.Explanation.Error; -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; @@ -43,11 +44,12 @@ public class ErrorTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/heat-model/src/test/java/com/woorea/openstack/heat/model/ExplanationTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/ExplanationTest.java index 4132cb0..ff8ebb2 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/ExplanationTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/ExplanationTest.java @@ -20,12 +20,12 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.Explanation; +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 com.woorea.openstack.heat.model.Explanation.Error; -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; @@ -47,9 +47,10 @@ public class ExplanationTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/LinkTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/LinkTest.java index 503e0e5..4565fe8 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/LinkTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/LinkTest.java @@ -20,11 +20,11 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.Link; -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; @@ -40,9 +40,10 @@ public class LinkTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/OutputTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/OutputTest.java index cc07012..a91eeff 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/OutputTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/OutputTest.java @@ -20,11 +20,12 @@ package com.woorea.openstack.heat.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 com.woorea.openstack.heat.model.Stack.Output; -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; @@ -41,9 +42,10 @@ public class OutputTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourceTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourceTest.java index ff7497e..0079ef3 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourceTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourceTest.java @@ -20,14 +20,14 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.Link; -import com.woorea.openstack.heat.model.Resource; +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.Date; import java.util.List; -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; @@ -56,9 +56,10 @@ public class ResourceTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourcesTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourcesTest.java index 0093ab3..37c5e72 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourcesTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/ResourcesTest.java @@ -20,13 +20,13 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.Resource; -import com.woorea.openstack.heat.model.Resources; +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.List; -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; @@ -73,9 +73,10 @@ public class ResourcesTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/StackTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/StackTest.java index 8659895..ea38918 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/StackTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/StackTest.java @@ -20,16 +20,16 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.Link; -import com.woorea.openstack.heat.model.Stack; +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 com.woorea.openstack.heat.model.Stack.Output; + import java.util.Date; import java.util.List; import java.util.Map; -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; @@ -76,11 +76,12 @@ public class StackTest { + "}"; private ObjectMapper objectMapper = new ObjectMapper() - .setSerializationInclusion(Inclusion.NON_NULL) - .enable(SerializationConfig.Feature.INDENT_OUTPUT) - .enable(SerializationConfig.Feature.WRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.UNWRAP_ROOT_VALUE) - .enable(DeserializationConfig.Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY); + .setSerializationInclusion(Include.NON_NULL) + .enable(SerializationFeature.INDENT_OUTPUT) + .enable(SerializationFeature.WRAP_ROOT_VALUE) + .enable(DeserializationFeature.UNWRAP_ROOT_VALUE) + .enable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY); @Test public void testSerialization() throws Exception { diff --git a/heat-model/src/test/java/com/woorea/openstack/heat/model/StacksTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/StacksTest.java index 884d5a9..880c482 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/StacksTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/StacksTest.java @@ -20,13 +20,11 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.Stack; -import com.woorea.openstack.heat.model.Stacks; -import java.util.List; -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; @@ -105,9 +103,10 @@ public class StacksTest { + "}"; 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/heat-model/src/test/java/com/woorea/openstack/heat/model/UpdateStackParamTest.java b/heat-model/src/test/java/com/woorea/openstack/heat/model/UpdateStackParamTest.java index 5bff417..5eb99c3 100644 --- a/heat-model/src/test/java/com/woorea/openstack/heat/model/UpdateStackParamTest.java +++ b/heat-model/src/test/java/com/woorea/openstack/heat/model/UpdateStackParamTest.java @@ -20,12 +20,13 @@ package com.woorea.openstack.heat.model; -import com.woorea.openstack.heat.model.UpdateStackParam; +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.Map; -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; @@ -52,9 +53,10 @@ public class UpdateStackParamTest { + "}"; 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 { |