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 02afe0376..7c31761f2 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()) {