Skip to content

Commit db94bc7

Browse files
committed
minor test cleanup
1 parent e588f0a commit db94bc7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/java/com/fasterxml/jackson/databind/jsontype/TestPolymorphicWithDefaultImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -198,11 +198,11 @@ public void testDefaultAsVoid() throws Exception
198198
// [databind#148]
199199
public void testBadTypeAsNull() throws Exception
200200
{
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("{}");
204204
assertNull(ob);
205-
ob = mapper.readValue("{ \"whatever\":13}", MysteryPolymorphic.class);
205+
ob = r.readValue("{ \"whatever\":13}");
206206
assertNull(ob);
207207
}
208208

0 commit comments

Comments
 (0)