File tree 2 files changed +7
-1
lines changed
src/test/java/com/fasterxml/jackson/databind
2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change 5
5
<parent >
6
6
<groupId >com.fasterxml.jackson</groupId >
7
7
<artifactId >jackson-base</artifactId >
8
- <version >2.9.5 </version >
8
+ <version >2.9.6-SNAPSHOT </version >
9
9
</parent >
10
10
11
11
<groupId >com.fasterxml.jackson.core</groupId >
Original file line number Diff line number Diff line change @@ -167,13 +167,19 @@ public void testObjectMapper() throws IOException
167
167
final String EXP_JSON = "{\" x\" :2,\" y\" :3}" ;
168
168
final MyPojo p = new MyPojo (2 , 3 );
169
169
assertEquals (EXP_JSON , MAPPER .writeValueAsString (p ));
170
+ assertNotNull (MAPPER .getFactory ());
171
+ assertNotNull (MAPPER .getFactory ().getCodec ());
170
172
171
173
byte [] bytes = jdkSerialize (MAPPER );
172
174
ObjectMapper mapper2 = jdkDeserialize (bytes );
173
175
assertEquals (EXP_JSON , mapper2 .writeValueAsString (p ));
174
176
MyPojo p2 = mapper2 .readValue (EXP_JSON , MyPojo .class );
175
177
assertEquals (p .x , p2 .x );
176
178
assertEquals (p .y , p2 .y );
179
+
180
+ // [databind#2038]: verify that codec is not lost
181
+ assertNotNull (mapper2 .getFactory ());
182
+ assertNotNull (mapper2 .getFactory ().getCodec ());
177
183
}
178
184
179
185
public void testTypeFactory () throws Exception
You can’t perform that action at this time.
0 commit comments