File tree 3 files changed +50
-1
lines changed
src/test/java/com/fasterxml/jackson
3 files changed +50
-1
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ public InsensitiveCreator(@JsonProperty("value") int v0) {
36
36
/* Test methods
37
37
/********************************************************
38
38
*/
39
+
39
40
private final ObjectMapper INSENSITIVE_MAPPER = new ObjectMapper ();
40
41
{
41
42
INSENSITIVE_MAPPER .enable (MapperFeature .ACCEPT_CASE_INSENSITIVE_PROPERTIES );
Original file line number Diff line number Diff line change
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
+ }
Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ static class Container {
50
50
/**********************************************************
51
51
*/
52
52
53
- // [Issue #291]
53
+ // [databind #291]
54
54
public void testMultiple () throws Exception
55
55
{
56
56
final ObjectMapper mapper = objectMapper ();
You can’t perform that action at this time.
0 commit comments