From 811efbacf3b34815c5cc08bb0cef30703203153f Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Tue, 13 May 2025 14:03:36 +0200 Subject: [PATCH] Polishing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove unneeded private getEntityInformation(…) method. See #2053 --- .../repository/support/R2dbcRepositoryFactory.java | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java index 3540cfcd9..e760f9cff 100644 --- a/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java +++ b/spring-data-r2dbc/src/main/java/org/springframework/data/r2dbc/repository/support/R2dbcRepositoryFactory.java @@ -107,9 +107,7 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport { @Override protected Object getTargetRepository(RepositoryInformation information) { - RelationalEntityInformation entityInformation = getEntityInformation(information.getDomainType(), - information); - + RelationalEntityInformation entityInformation = getEntityInformation(information.getDomainType()); return getTargetRepositoryViaReflection(information, entityInformation, operations, this.converter); } @@ -119,16 +117,10 @@ public class R2dbcRepositoryFactory extends ReactiveRepositoryFactorySupport { return Optional.of(new R2dbcQueryLookupStrategy(operations, new CachingValueExpressionDelegate(valueExpressionDelegate), converter, dataAccessStrategy)); } + @Override public RelationalEntityInformation getEntityInformation(Class domainClass) { - return getEntityInformation(domainClass, null); - } - - @SuppressWarnings("unchecked") - private RelationalEntityInformation getEntityInformation(Class domainClass, - @Nullable RepositoryInformation information) { RelationalPersistentEntity entity = this.mappingContext.getRequiredPersistentEntity(domainClass); - return new MappingRelationalEntityInformation<>((RelationalPersistentEntity) entity); }