DATACMNS-1673 - Polishing.

Use method references where possible. Cleanup generics. Omit superfluous calls.

Original pull request: #426.
This commit is contained in:
SergiiTsypanov
2020-02-25 09:38:42 +01:00
committed by Mark Paluch
parent 5f3102144c
commit eaaa37d4ff
4 changed files with 6 additions and 8 deletions

View File

@@ -307,7 +307,7 @@ class EntityCallbackDiscoverer {
Collection<Method> methods = new ArrayList<>(1);
ReflectionUtils.doWithMethods(callbackType, mc -> methods.add(mc), method -> {
ReflectionUtils.doWithMethods(callbackType, methods::add, method -> {
if (!Modifier.isPublic(method.getModifiers()) || method.getParameterCount() != args.length + 1
|| method.isBridge() || ReflectionUtils.isObjectMethod(method)) {

View File

@@ -278,9 +278,7 @@ public class BasicPersistentEntity<T, P extends PersistentProperty<P>> implement
Assert.notNull(association, "Association must not be null!");
if (!associations.contains(association)) {
associations.add(association);
}
associations.add(association);
}
/*