Nullability refinements and related polishing
This commit is contained in:
@@ -27,6 +27,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import org.springframework.core.annotation.AnnotationUtils;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.ContextConfigurationAttributes;
|
||||
import org.springframework.test.context.ContextHierarchy;
|
||||
@@ -249,11 +250,11 @@ abstract class ContextLoaderUtils {
|
||||
}
|
||||
|
||||
private static void resolveContextConfigurationAttributes(List<ContextConfigurationAttributes> attributesList,
|
||||
AnnotationDescriptor<ContextConfiguration> descriptor) {
|
||||
@Nullable AnnotationDescriptor<ContextConfiguration> descriptor) {
|
||||
|
||||
if (descriptor != null) {
|
||||
convertContextConfigToConfigAttributesAndAddToList(descriptor.synthesizeAnnotation(),
|
||||
descriptor.getRootDeclaringClass(), attributesList);
|
||||
descriptor.getRootDeclaringClass(), attributesList);
|
||||
resolveContextConfigurationAttributes(attributesList, descriptor.next());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -163,6 +163,7 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
|
||||
return findTransactionAttributeInEnclosingClassHierarchy(clazz);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private TransactionAttribute findTransactionAttributeInEnclosingClassHierarchy(Class<?> clazz) {
|
||||
if (MetaAnnotationUtils.searchEnclosingClass(clazz)) {
|
||||
return findTransactionAttribute(clazz.getEnclosingClass());
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package org.springframework.test.context.web;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.test.context.ContextLoader;
|
||||
import org.springframework.test.context.MergedContextConfiguration;
|
||||
import org.springframework.test.context.TestContextBootstrapper;
|
||||
@@ -70,6 +71,7 @@ public class WebTestContextBootstrapper extends DefaultTestContextBootstrapper {
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static WebAppConfiguration getWebAppConfiguration(Class<?> testClass) {
|
||||
return MetaAnnotationUtils.findMergedAnnotation(testClass, WebAppConfiguration.class);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user