File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
src/test/java/com/fasterxml/jackson/databind/jsontype Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -198,11 +198,11 @@ public void testDefaultAsVoid() throws Exception
198
198
// [databind#148]
199
199
public void testBadTypeAsNull () throws Exception
200
200
{
201
- ObjectMapper mapper = new ObjectMapper ();
202
- mapper . disable (DeserializationFeature .FAIL_ON_INVALID_SUBTYPE );
203
- Object ob = mapper .readValue ("{}" , MysteryPolymorphic . class );
201
+ ObjectReader r = MAPPER . readerFor ( MysteryPolymorphic . class )
202
+ . without (DeserializationFeature .FAIL_ON_INVALID_SUBTYPE );
203
+ Object ob = r .readValue ("{}" );
204
204
assertNull (ob );
205
- ob = mapper .readValue ("{ \" whatever\" :13}" , MysteryPolymorphic . class );
205
+ ob = r .readValue ("{ \" whatever\" :13}" );
206
206
assertNull (ob );
207
207
}
208
208
You can’t perform that action at this time.
0 commit comments