}
}
final Object newObject = factory.get(beanKey);
if (newObject == null) {
if (isDto) {
throw new BeanFactoryUnableToCreateInstanceException(factory.toString(),
dtoFieldName, dtoBeanKey, true);
} else {
throw new BeanFactoryUnableToCreateInstanceException(factory.toString(),
entityFieldName, entityBeanKey, false);
}
}
return newObject;
}