DATACMNS-854 - Allow custom implementation of repository methods with generics.
Add additional check for detecting customized method where method contains generics. Overriding methods without generics already works, this patch simply makes the behavior consistent. Original pull request: #162.
This commit is contained in:
committed by
Oliver Gierke
parent
87566df432
commit
e0fc7deb05
@@ -356,7 +356,10 @@ class DefaultRepositoryInformation implements RepositoryInformation {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
if (!types[i].equals(parameterType)) {
|
||||
// We must either have an exact match, or,
|
||||
if (!types[i].equals(parameterType) &&
|
||||
// the tpes must be assignable _and_ signature definition types must be identical.
|
||||
!(types[i].isAssignableFrom(parameterType) && types[i].equals(method.getParameterTypes()[i]))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user