Merge branch 'gh-21271'

Closes gh-21271
This commit is contained in:
Andy Wilkinson
2020-06-16 12:52:17 +01:00
70 changed files with 355 additions and 234 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -77,6 +77,7 @@ public class FilteredClassLoader extends URLClassLoader {
* name of a class or a resource name.
*/
@SafeVarargs
@SuppressWarnings("varargs")
public FilteredClassLoader(Predicate<String>... filters) {
this(Arrays.asList(filters), Arrays.asList(filters));
}

View File

@@ -16,7 +16,6 @@
package org.springframework.boot.test.mock.mockito;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collection;
@@ -333,8 +332,8 @@ public class MockitoPostProcessor extends InstantiationAwareBeanPostProcessorAda
}
@Override
public PropertyValues postProcessPropertyValues(PropertyValues pvs, PropertyDescriptor[] pds, final Object bean,
String beanName) throws BeansException {
public PropertyValues postProcessProperties(PropertyValues pvs, Object bean, String beanName)
throws BeansException {
ReflectionUtils.doWithFields(bean.getClass(), (field) -> postProcessField(bean, field));
return pvs;
}