Not exposing ApplicationContext on ConditionContext anymore

This commit is contained in:
Juergen Hoeller
2013-08-28 00:00:54 +02:00
parent 1e64eed6b2
commit 5efe894ee4
9 changed files with 78 additions and 129 deletions

View File

@@ -41,8 +41,7 @@ public class AsmCircularImportDetectionTests extends AbstractCircularImportDetec
new StandardEnvironment(),
new DefaultResourceLoader(),
new AnnotationBeanNameGenerator(),
new DefaultListableBeanFactory(),
null);
new DefaultListableBeanFactory());
}
@Override

View File

@@ -25,6 +25,7 @@ import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.springframework.beans.factory.NoSuchBeanDefinitionException;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.core.annotation.AnnotationAttributes;
@@ -333,7 +334,6 @@ public class ConfigurationClassWithConditionTests {
@Override
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
assertThat(context.getApplicationContext(), notNullValue());
assertThat(context.getBeanFactory(), notNullValue());
assertThat(context.getClassLoader(), notNullValue());
assertThat(context.getEnvironment(), notNullValue());
@@ -341,7 +341,6 @@ public class ConfigurationClassWithConditionTests {
assertThat(context.getResourceLoader(), notNullValue());
return true;
}
}
static class ExampleBean {