DATACMNS-1673 - Polishing.
Use method references where possible. Cleanup generics. Omit superfluous calls. Original pull request: #426.
This commit is contained in:
committed by
Mark Paluch
parent
5f3102144c
commit
eaaa37d4ff
@@ -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)) {
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user