Refined throwing of BeanCreationExceptions (and reflection exceptions)

Issue: SPR-14883
This commit is contained in:
Juergen Hoeller
2016-11-07 19:03:18 +01:00
parent cf479bf893
commit b3cd1ad7f1
6 changed files with 18 additions and 43 deletions

View File

@@ -389,14 +389,8 @@ public class PersistenceAnnotationBeanPostProcessor
if (metadata != null) {
metadata.clear(pvs);
}
try {
metadata = buildPersistenceMetadata(clazz);
this.injectionMetadataCache.put(cacheKey, metadata);
}
catch (NoClassDefFoundError err) {
throw new IllegalStateException("Failed to introspect bean class [" + clazz.getName() +
"] for persistence metadata: could not find class that it depends on", err);
}
metadata = buildPersistenceMetadata(clazz);
this.injectionMetadataCache.put(cacheKey, metadata);
}
}
}