Skip to content

Commit 5b6ce55

Browse files
committed
Merge branch '2.8'
2 parents 17a8c72 + a2e3460 commit 5b6ce55

File tree

2 files changed

+49
-0
lines changed

2 files changed

+49
-0
lines changed

src/test/java/com/fasterxml/jackson/databind/misc/CaseInsensitiveDeserTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public InsensitiveCreator(@JsonProperty("value") int v0) {
3636
/* Test methods
3737
/********************************************************
3838
*/
39+
3940
private final ObjectMapper INSENSITIVE_MAPPER = new ObjectMapper();
4041
{
4142
INSENSITIVE_MAPPER.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES);
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
package com.fasterxml.jackson.failing;
2+
3+
import com.fasterxml.jackson.annotation.*;
4+
5+
import com.fasterxml.jackson.databind.BaseMapTest;
6+
import com.fasterxml.jackson.databind.ObjectMapper;
7+
8+
public class IgnoredCreatorProperty1572Test extends BaseMapTest
9+
{
10+
static class InnerTest
11+
{
12+
public String str;
13+
public String otherStr;
14+
}
15+
16+
static class OuterTest
17+
{
18+
InnerTest inner;
19+
20+
@JsonIgnore
21+
public String otherStr;
22+
23+
@JsonCreator
24+
public OuterTest(@JsonProperty("inner") InnerTest inner,
25+
@JsonProperty("otherOtherStr") String otherStr) {
26+
this.inner = inner;
27+
}
28+
}
29+
30+
/*
31+
/********************************************************
32+
/* Test methods
33+
/********************************************************
34+
*/
35+
36+
private final ObjectMapper MAPPER = new ObjectMapper();
37+
38+
// [databind#1572]
39+
public void testIgnoredCtorParam() throws Exception
40+
{
41+
String JSON = aposToQuotes("{'innerTest': {\n"
42+
+"'str':'str',\n"
43+
+"'otherStr': 'otherStr'\n"
44+
+"}}\n");
45+
OuterTest result = MAPPER.readValue(JSON, OuterTest.class);
46+
assertNotNull(result);
47+
}
48+
}

0 commit comments

Comments
 (0)