Skip to content

Commit 7422ba4

Browse files
committed
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.
1 parent 024f1ae commit 7422ba4

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

src/main/java/org/springframework/data/repository/core/support/DefaultRepositoryInformation.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -397,17 +397,7 @@ private boolean matchesGenericType(TypeVariable<?> variable, ResolvableType para
397397
Type boundType = variable.getBounds()[0];
398398
String referenceName = boundType instanceof TypeVariable ? boundType.toString() : variable.toString();
399399

400-
boolean isDomainTypeVariableReference = DOMAIN_TYPE_NAME.equals(referenceName);
401-
boolean parameterMatchesEntityType = parameterType.isAssignableFrom(entityType);
402-
403-
// We need this check to be sure not to match save(Iterable) for entities implementing Iterable
404-
boolean isNotIterable = !parameterType.equals(Iterable.class);
405-
406-
if (isDomainTypeVariableReference && parameterMatchesEntityType && isNotIterable) {
407-
return true;
408-
}
409-
410-
return false;
400+
return DOMAIN_TYPE_NAME.equals(referenceName) && parameterType.isAssignableFrom(entityType);
411401
}
412402

413403
for (Type type : variable.getBounds()) {

0 commit comments

Comments
 (0)