Spring cleaning: use method references
This commit is contained in:
@@ -233,8 +233,7 @@ public class ScriptFactoryPostProcessor implements SmartInstantiationAwareBeanPo
|
||||
|
||||
// Filter out BeanPostProcessors that are part of the AOP infrastructure,
|
||||
// since those are only meant to apply to beans defined in the original factory.
|
||||
this.scriptBeanFactory.getBeanPostProcessors().removeIf(beanPostProcessor ->
|
||||
beanPostProcessor instanceof AopInfrastructureBean);
|
||||
this.scriptBeanFactory.getBeanPostProcessors().removeIf(AopInfrastructureBean.class::isInstance);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -98,7 +98,7 @@ public interface MethodValidationResult {
|
||||
*/
|
||||
default List<ParameterErrors> getBeanResults() {
|
||||
return getAllValidationResults().stream()
|
||||
.filter(result -> result instanceof ParameterErrors)
|
||||
.filter(ParameterErrors.class::isInstance)
|
||||
.map(result -> (ParameterErrors) result)
|
||||
.toList();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user