Rename {Default=>Standard}Environment

Issue: SPR-8348
This commit is contained in:
Chris Beams
2011-05-20 03:53:37 +00:00
parent 615fcff7ae
commit c06752ef72
26 changed files with 114 additions and 113 deletions

View File

@@ -17,7 +17,7 @@ package org.springframework.context.annotation;
import org.springframework.beans.factory.parsing.FailFastProblemReporter;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.env.DefaultEnvironment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
@@ -38,7 +38,7 @@ public class AsmCircularImportDetectionTests extends AbstractCircularImportDetec
return new ConfigurationClassParser(
new CachingMetadataReaderFactory(),
new FailFastProblemReporter(),
new DefaultEnvironment(),
new StandardEnvironment(),
new DefaultResourceLoader(),
new DefaultListableBeanFactory());
}

View File

@@ -30,7 +30,7 @@ import org.aspectj.lang.annotation.Aspect;
import org.junit.Test;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.core.env.ConfigurableEnvironment;
import org.springframework.core.env.DefaultEnvironment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.type.filter.AnnotationTypeFilter;
import org.springframework.core.type.filter.AssignableTypeFilter;
import org.springframework.core.type.filter.RegexPatternTypeFilter;
@@ -175,7 +175,7 @@ public class ClassPathScanningCandidateComponentProviderTests {
@Test
public void testWithInactiveProfile() {
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(true);
ConfigurableEnvironment env = new DefaultEnvironment();
ConfigurableEnvironment env = new StandardEnvironment();
env.setActiveProfiles("other");
provider.setEnvironment(env);
Set<BeanDefinition> candidates = provider.findCandidateComponents(TEST_PROFILE_PACKAGE);
@@ -185,7 +185,7 @@ public class ClassPathScanningCandidateComponentProviderTests {
@Test
public void testWithActiveProfile() {
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(true);
ConfigurableEnvironment env = new DefaultEnvironment();
ConfigurableEnvironment env = new StandardEnvironment();
env.setActiveProfiles(ProfileAnnotatedComponent.PROFILE_NAME);
provider.setEnvironment(env);
Set<BeanDefinition> candidates = provider.findCandidateComponents(TEST_PROFILE_PACKAGE);

View File

@@ -28,7 +28,7 @@ import java.util.Properties;
import org.junit.Test;
import org.springframework.beans.factory.BeanDefinitionStoreException;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.core.env.DefaultEnvironment;
import org.springframework.core.env.StandardEnvironment;
import org.springframework.core.env.MutablePropertySources;
import org.springframework.core.env.PropertySource;
import org.springframework.core.io.ClassPathResource;
@@ -233,7 +233,7 @@ public class PropertySourcesPlaceholderConfigurerTests {
System.setProperty("key1", "systemKey1Value");
System.setProperty("key2", "systemKey2Value");
ppc.setEnvironment(new DefaultEnvironment());
ppc.setEnvironment(new StandardEnvironment());
ppc.postProcessBeanFactory(bf);
System.clearProperty("key1");
System.clearProperty("key2");