Browse Source

DATAJDBC-238 - JdbcRepositoryFactory.getEntityInformation never returns null.

Instead it throws an exception as this is required by the interface it implements.
pull/80/head
Jens Schauder 8 years ago
parent
commit
0445aa61db
  1. 6
      src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java

6
src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java

@ -92,11 +92,7 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport {
@Override @Override
public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> aClass) { public <T, ID> EntityInformation<T, ID> getEntityInformation(Class<T> aClass) {
RelationalPersistentEntity<?> entity = context.getPersistentEntity(aClass); RelationalPersistentEntity<?> entity = context.getRequiredPersistentEntity(aClass);
if (entity == null) {
return null;
}
return (EntityInformation<T, ID>) new PersistentEntityInformation<>(entity); return (EntityInformation<T, ID>) new PersistentEntityInformation<>(entity);
} }

Loading…
Cancel
Save