Skip to content

Commit a2e3460

Browse files
committed
Add repro for #1572
1 parent 3dd61ce commit a2e3460

File tree

3 files changed

+50
-1
lines changed

3 files changed

+50
-1
lines changed

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

+1
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);
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+
}

src/test/java/com/fasterxml/jackson/failing/TestMultipleExternalIds291.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ static class Container {
5050
/**********************************************************
5151
*/
5252

53-
// [Issue#291]
53+
// [databind#291]
5454
public void testMultiple() throws Exception
5555
{
5656
final ObjectMapper mapper = objectMapper();

0 commit comments

Comments
 (0)