Polish: anonymous inner classes containing only one method should become lambdas,

use getOrDefault instead of ternary operator
This commit is contained in:
igor-suhorukov
2018-02-16 10:02:33 +03:00
committed by Juergen Hoeller
parent aa4bcedad3
commit 2be4985b8f
11 changed files with 64 additions and 133 deletions

View File

@@ -306,13 +306,8 @@ public class ReflectiveAspectJAdvisorFactory extends AbstractAspectJAdvisorFacto
protected static class SyntheticInstantiationAdvisor extends DefaultPointcutAdvisor {
public SyntheticInstantiationAdvisor(final MetadataAwareAspectInstanceFactory aif) {
super(aif.getAspectMetadata().getPerClausePointcut(), new MethodBeforeAdvice() {
@Override
public void before(Method method, Object[] args, @Nullable Object target) {
// Simply instantiate the aspect
aif.getAspectInstance();
}
});
super(aif.getAspectMetadata().getPerClausePointcut(), (MethodBeforeAdvice)
(method, args, target) -> aif.getAspectInstance());// Simply instantiate the aspect
}
}