Polishing
This commit is contained in:
@@ -151,7 +151,7 @@ public abstract class AbstractDelegatingSmartContextLoader implements SmartConte
|
||||
@Override
|
||||
public void processContextConfiguration(final ContextConfigurationAttributes configAttributes) {
|
||||
Assert.notNull(configAttributes, "configAttributes must not be null");
|
||||
Assert.isTrue(!(configAttributes.hasLocations() && configAttributes.hasClasses()), String.format(
|
||||
Assert.isTrue(!(configAttributes.hasLocations() && configAttributes.hasClasses()), () -> String.format(
|
||||
"Cannot process locations AND classes for context configuration %s: "
|
||||
+ "configure one or the other, but not both.", configAttributes));
|
||||
|
||||
|
||||
@@ -555,12 +555,7 @@ public abstract class AbstractTestContextBootstrapper implements TestContextBoot
|
||||
|
||||
|
||||
private static boolean areAllEmpty(Collection<?>... collections) {
|
||||
for (Collection<?> collection : collections) {
|
||||
if (!collection.isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return Arrays.stream(collections).allMatch(Collection::isEmpty);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ public abstract class TestPropertySourceUtils {
|
||||
}
|
||||
String[] locationsArray = TestContextResourceUtils.convertToClasspathResourcePaths(
|
||||
attrs.getDeclaringClass(), attrs.getLocations());
|
||||
locations.addAll(0, Arrays.<String> asList(locationsArray));
|
||||
locations.addAll(0, Arrays.asList(locationsArray));
|
||||
if (!attrs.isInheritLocations()) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user