Allow null ObjectMapper in Jackson2ObjectMapperFactoryBean.getObjectType()

Issue: SPR-11785
This commit is contained in:
Sebastien Deleuze
2014-08-14 13:40:47 +02:00
parent 181299cc6c
commit ebc726a915
2 changed files with 6 additions and 2 deletions

View File

@@ -182,6 +182,11 @@ public class Jackson2ObjectMapperFactoryBeanTests {
assertEquals(ObjectMapper.class, this.factory.getObjectType());
}
@Test
public void undefinedObjectType() {
assertEquals(null, this.factory.getObjectType());
}
private static SerializerFactoryConfig getSerializerFactoryConfig(ObjectMapper objectMapper) {
return ((BasicSerializerFactory) objectMapper.getSerializerFactory()).getFactoryConfig();
}