Polish: anonymous inner classes containing only one method should become lambdas,
use getOrDefault instead of ternary operator
This commit is contained in:
committed by
Juergen Hoeller
parent
aa4bcedad3
commit
2be4985b8f
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user