#476 - ENH: Enable ServiceConfig to use alternate ClassLoader - was ServiceConfig add setClassloader api --- part 3: Refactor with ClassLoadConfig

This commit is contained in:
Robin Bygrave committed 2015-12-07 22:13:27 +13:00
1 parent 2859ea657e
commit f252b80c2d
16 files changed
+266 -256

No files matched your search

@@ -31,7 +31,7 @@ public class BeanPropertyAssocManyJsonHelp {
*/
public BeanPropertyAssocManyJsonHelp(BeanPropertyAssocMany<?> many) {
this.many = many;
this.jsonTransient = !ClassUtil.isJacksonObjectMapperPresent() ? null : new BeanPropertyAssocManyJsonTransient();
this.jsonTransient = new BeanPropertyAssocManyJsonTransient();
}
/**
@@ -81,9 +81,6 @@ public class BeanPropertyAssocManyJsonHelp {
*/
private void jsonReadTransientUsingObjectMapper(ReadJson readJson, EntityBean parentBean) throws IOException {
if (jsonTransient == null) {
throw new IllegalStateException("Jackson ObjectMapper is required to read this Transient property "+many.getFullBeanName());
}
jsonTransient.jsonReadUsingObjectMapper(many, readJson, parentBean);
}
}