diff options
author | Tatu Saloranta <tatu.saloranta@iki.fi> | 2020-04-15 12:52:25 -0700 |
---|---|---|
committer | Tatu Saloranta <tatu.saloranta@iki.fi> | 2020-04-15 12:52:25 -0700 |
commit | 90aa990cc878d42f4040b0201ba5f6c5e49c363b (patch) | |
tree | b67e687ab022ed05a761ec4c2d44dbaf5c797acb /src/test | |
parent | 8e4de185cdae944fdeb478e16a1051abc38e1ac8 (diff) | |
download | jackson-databind-90aa990cc878d42f4040b0201ba5f6c5e49c363b.tar.gz |
Fix #962
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java | 8 | ||||
-rw-r--r-- | src/test/java/com/fasterxml/jackson/databind/deser/inject/InjectableWithoutDeser962Test.java (renamed from src/test/java/com/fasterxml/jackson/failing/SkipInjectableIntrospection962Test.java) | 9 |
2 files changed, 9 insertions, 8 deletions
diff --git a/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java b/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java index e575aaf15..06cc2af6e 100644 --- a/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java +++ b/src/test/java/com/fasterxml/jackson/databind/deser/creators/TestValueInstantiator.java @@ -117,7 +117,7 @@ public class TestValueInstantiator extends BaseMapTest @Override public CreatorProperty[] getFromObjectArguments(DeserializationConfig config) { return new CreatorProperty[] { - new CreatorProperty(new PropertyName("type"), config.constructType(Class.class), null, + CreatorProperty.construct(new PropertyName("type"), config.constructType(Class.class), null, null, null, null, 0, null, PropertyMetadata.STD_REQUIRED) }; @@ -147,7 +147,7 @@ public class TestValueInstantiator extends BaseMapTest @Override public CreatorProperty[] getFromObjectArguments(DeserializationConfig config) { return new CreatorProperty[] { - new CreatorProperty(new PropertyName("name"), config.constructType(String.class), null, + CreatorProperty.construct(new PropertyName("name"), config.constructType(String.class), null, null, null, null, 0, null, PropertyMetadata.STD_REQUIRED) }; @@ -427,12 +427,12 @@ public class TestValueInstantiator extends BaseMapTest @Override public CreatorProperty[] getFromObjectArguments(DeserializationConfig config) { return new CreatorProperty[] { - new CreatorProperty(new PropertyName("secret"), config.constructType(String.class), null, + CreatorProperty.construct(new PropertyName("secret"), config.constructType(String.class), null, null, null, null, 0, null, PropertyMetadata.STD_REQUIRED) }; } - + @Override public Object createFromObjectWith(DeserializationContext ctxt, Object[] args) { return new CreatorBean((String) args[0]); diff --git a/src/test/java/com/fasterxml/jackson/failing/SkipInjectableIntrospection962Test.java b/src/test/java/com/fasterxml/jackson/databind/deser/inject/InjectableWithoutDeser962Test.java index 88f283a1f..00295eb47 100644 --- a/src/test/java/com/fasterxml/jackson/failing/SkipInjectableIntrospection962Test.java +++ b/src/test/java/com/fasterxml/jackson/databind/deser/inject/InjectableWithoutDeser962Test.java @@ -1,4 +1,4 @@ -package com.fasterxml.jackson.failing; +package com.fasterxml.jackson.databind.deser.inject; import com.fasterxml.jackson.annotation.JacksonInject; import com.fasterxml.jackson.annotation.JsonCreator; @@ -6,8 +6,10 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.OptBoolean; import com.fasterxml.jackson.databind.*; -public class SkipInjectableIntrospection962Test extends BaseMapTest +// [databind#962]: "pure" Injectable that could not be deserialized +public class InjectableWithoutDeser962Test extends BaseMapTest { + // [databind#962] static class InjectMe { private String a; @@ -43,8 +45,7 @@ public class SkipInjectableIntrospection962Test extends BaseMapTest } } - // 14-Jun-2016, tatu: For some odd reason, this test sometimes fails, other times not... - // possibly related to unstable ordering of properties? + // [databind#962] public void testInjected() throws Exception { InjectMe im = new InjectMe(true); |