File tree 1 file changed +44
-0
lines changed
src/test/java/com/fasterxml/jackson/failing
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change
1
+ package com .fasterxml .jackson .failing ;
2
+
3
+ import com .fasterxml .jackson .annotation .JsonProperty ;
4
+ import com .fasterxml .jackson .databind .BaseMapTest ;
5
+
6
+ import java .io .IOException ;
7
+
8
+ public class TestInnerClassReaderFor extends BaseMapTest {
9
+
10
+ class X {
11
+ private String value ;
12
+
13
+ X (String value ) {
14
+ this .value = value ;
15
+ }
16
+
17
+ public String getValue () {
18
+ return value ;
19
+ }
20
+
21
+ public void setValue (String value ) {
22
+ this .value = value ;
23
+ }
24
+ }
25
+
26
+ class Y extends X {
27
+ Y (@ JsonProperty ("value" ) String value ) {
28
+ super (value );
29
+ }
30
+ }
31
+
32
+ public void testReaderFor () throws IOException {
33
+
34
+ X x = new X ("dummy" );
35
+ objectMapper ().readerForUpdating (x ).readValue ("{\" value\" : \" updatedX\" }" );
36
+ assertEquals (x .getValue (), "updatedX" );
37
+
38
+ Y y = new Y ("dummy" );
39
+ objectMapper ().readerForUpdating (y ).readValue ("{\" value\" : \" updatedY\" }" );
40
+ assertEquals (y .getValue (), "updatedY" );
41
+
42
+ }
43
+
44
+ }
You can’t perform that action at this time.
0 commit comments