From 0445aa61db48a5efd418f1f72942d97554a70ea7 Mon Sep 17 00:00:00 2001 From: Jens Schauder Date: Fri, 20 Jul 2018 13:49:43 +0200 Subject: [PATCH] DATAJDBC-238 - JdbcRepositoryFactory.getEntityInformation never returns null. Instead it throws an exception as this is required by the interface it implements. --- .../data/jdbc/repository/support/JdbcRepositoryFactory.java | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java b/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java index 69b4b9e8a..db5d196d5 100644 --- a/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java +++ b/src/main/java/org/springframework/data/jdbc/repository/support/JdbcRepositoryFactory.java @@ -92,11 +92,7 @@ public class JdbcRepositoryFactory extends RepositoryFactorySupport { @Override public EntityInformation getEntityInformation(Class aClass) { - RelationalPersistentEntity entity = context.getPersistentEntity(aClass); - - if (entity == null) { - return null; - } + RelationalPersistentEntity entity = context.getRequiredPersistentEntity(aClass); return (EntityInformation) new PersistentEntityInformation<>(entity); }