DATACMNS-1008 - Reintroduced lost support for non-generic redeclarations of generic CRUD methods.
The changes for DATACMNS-854 and DATACMNS-912 dropped the support for the simpler redeclaration of generic methods like CrudRepository.save(…) which as of the changes requires to be redeclared like <T extends Foo> T save(T entity). Previously a simple redeclaration like Foo save(Foo entity) was sufficient. This commit reintroduces the check for a direct match of the parameter types and shortcuts the more detailed check that's necessary in case of type variables being involved. Related tickets: DATACMNS-854, DATACMNS-912.
This commit is contained in:
@@ -419,6 +419,10 @@ class DefaultRepositoryInformation implements RepositoryInformation {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (types[i].equals(parameterType)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!type.isAssignableFrom(parameterType) || !type.equals(methodParameterTypes[i])) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user