Add null check to hibernate decorator

This commit is contained in:
Brian Devins-Suresh 2020-01-24 10:58:52 -05:00
parent 70c874b135
commit 3daad0009d
1 changed files with 3 additions and 0 deletions

View File

@ -47,6 +47,9 @@ public class HibernateDecorator extends OrmClientDecorator {
@Override @Override
public String entityName(final Object entity) { public String entityName(final Object entity) {
if (entity == null) {
return null;
}
String name = null; String name = null;
final Set<String> annotations = new HashSet<>(); final Set<String> annotations = new HashSet<>();
for (final Annotation annotation : entity.getClass().getDeclaredAnnotations()) { for (final Annotation annotation : entity.getClass().getDeclaredAnnotations()) {