From 7422ba4093507ecf150f9419677fff1020694296 Mon Sep 17 00:00:00 2001 From: Oliver Gierke Date: Wed, 28 Sep 2016 17:25:51 +0200 Subject: [PATCH] DATACMNS-923 - Removed obsolete code in DefaultRepositoryInformation. The special case of an Iterable parameter doesn't have to be handled explicitly anymore so that we can simplify the type match check in DefaultRepositoryInformation. Related ticket: DATACMNS-912. --- .../core/support/DefaultRepositoryInformation.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java b/src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java index b2448ec50..93bb39914 100644 --- a/src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java +++ b/src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java @@ -397,17 +397,7 @@ class DefaultRepositoryInformation implements RepositoryInformation { Type boundType = variable.getBounds()[0]; String referenceName = boundType instanceof TypeVariable ? boundType.toString() : variable.toString(); - boolean isDomainTypeVariableReference = DOMAIN_TYPE_NAME.equals(referenceName); - boolean parameterMatchesEntityType = parameterType.isAssignableFrom(entityType); - - // We need this check to be sure not to match save(Iterable) for entities implementing Iterable - boolean isNotIterable = !parameterType.equals(Iterable.class); - - if (isDomainTypeVariableReference && parameterMatchesEntityType && isNotIterable) { - return true; - } - - return false; + return DOMAIN_TYPE_NAME.equals(referenceName) && parameterType.isAssignableFrom(entityType); } for (Type type : variable.getBounds()) {