DATACMNS-943 - We prefer direct matches on repository query method overloads.
We now try to look up a target class method based on concrete name and parameter type before falling back on the more expensive type matches. This also eliminates the possibility of invalid method matches as described in the ticket.
This commit is contained in:
@@ -246,6 +246,12 @@ class DefaultRepositoryInformation implements RepositoryInformation {
|
||||
return method;
|
||||
}
|
||||
|
||||
Method result = findMethod(baseClass, method.getName(), method.getParameterTypes());
|
||||
|
||||
if (result != null) {
|
||||
return result;
|
||||
}
|
||||
|
||||
for (Method baseClassMethod : baseClass.getMethods()) {
|
||||
|
||||
// Wrong name
|
||||
|
||||
Reference in New Issue
Block a user