DATACMNS-300 - Fixed exception handling in ReflectionEntityInstantiator.

ReflectionEntityInstantiator now actually throws the wrapped exception created in the catch block handling BeanInstantiationExceptions.

Pull request: #25.
This commit is contained in:
Johannes Mockenhaupt
2013-02-26 18:39:41 +01:00
committed by Oliver Gierke
parent 9781f603ea
commit 596908946d
2 changed files with 17 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ public enum ReflectionEntityInstantiator implements EntityInstantiator {
return BeanUtils.instantiateClass(entity.getType());
}
} catch (BeanInstantiationException e) {
new MappingInstantiationException(entity, Collections.emptyList(), e);
throw new MappingInstantiationException(entity, Collections.emptyList(), e);
}
}