Commit 1866d0eb authored by Emmanuel Bourg's avatar Emmanuel Bourg

Updated version 4.3.11 from 'upstream/4.3.11'

with Debian dir 8d89741d7944978b5d4ef0feba80d92e67bc8c35
parents a142c328 0ffebdad
......@@ -31,7 +31,7 @@ configure(allprojects) { project ->
group = "org.springframework"
version = qualifyVersionIfNecessary(version)
ext.aspectjVersion = "1.8.10"
ext.aspectjVersion = "1.8.9"
ext.caffeineVersion = "2.3.5"
ext.eclipselinkVersion = "2.4.2"
ext.ehcacheVersion = "2.10.4"
......@@ -52,7 +52,7 @@ configure(allprojects) { project ->
ext.hsqldbVersion = "2.3.4"
ext.httpasyncVersion = "4.1.3"
ext.httpclientVersion = "4.5.3"
ext.jackson2Version = "2.8.9"
ext.jackson2Version = "2.8.10"
ext.jasperreportsVersion = "6.2.1" // our tests fail with JR-internal NPEs against 6.2.2 and higher
ext.javamailVersion = "1.5.6"
ext.jettyVersion = "9.3.14.v20161028" // as of 9.3.15, Jetty has hard Servlet 3.1 requirement
......@@ -62,9 +62,9 @@ configure(allprojects) { project ->
ext.jtaVersion = "1.2"
ext.junitVersion = "4.12"
ext.log4jVersion = "1.2.17"
ext.nettyVersion = "4.1.13.Final"
ext.nettyVersion = "4.1.15.Final"
ext.okhttpVersion = "2.7.5"
ext.okhttp3Version = "3.7.0"
ext.okhttp3Version = "3.8.1"
ext.openjpaVersion = "2.4.1"
ext.poiVersion = "3.14"
ext.reactorVersion = "2.0.8.RELEASE"
......@@ -77,7 +77,7 @@ configure(allprojects) { project ->
ext.tiles3Version = "3.0.7"
ext.tomcatVersion = "8.5.16"
ext.tyrusVersion = "1.3.5" // constrained by WebLogic 12.1.3 support
ext.undertowVersion = "1.3.30.Final"
ext.undertowVersion = "1.3.31.Final"
ext.xmlunitVersion = "1.6"
ext.xstreamVersion = "1.4.9"
......@@ -658,6 +658,8 @@ project("spring-context-support") {
testCompile("org.slf4j:slf4j-api:${slf4jVersion}")
testRuntime("com.sun.mail:javax.mail:${javamailVersion}")
testRuntime("org.ehcache:jcache:${ehcachejcacheVersion}")
testRuntime("org.ehcache:ehcache:${ehcache3Version}")
testRuntime("org.terracotta:management-model:2.3.0")
}
}
......@@ -1034,8 +1036,6 @@ project("spring-test") {
testCompile("org.apache.httpcomponents:httpclient:${httpclientVersion}")
testCompile("javax.cache:cache-api:1.0.0")
testRuntime("log4j:log4j:${log4jVersion}")
testRuntime("org.ehcache:ehcache:${ehcache3Version}")
testRuntime("org.terracotta:management-model:2.3.0")
}
task testNG(type: Test) {
......
version=4.3.10.RELEASE
version=4.3.11.RELEASE
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2017 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.
......@@ -232,6 +232,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
* Return whether this a <b>Prototype</b>, with an independent instance
* returned for each call.
* @since 3.0
* @see #SCOPE_PROTOTYPE
*/
boolean isPrototype();
......
......@@ -366,7 +366,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
}
// Check if required type matches the type of the actual bean instance.
if (requiredType != null && bean != null && !requiredType.isAssignableFrom(bean.getClass())) {
if (requiredType != null && bean != null && !requiredType.isInstance(bean)) {
try {
return getTypeConverter().convertIfNecessary(bean, requiredType);
}
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......@@ -16,7 +16,6 @@
package org.springframework.cache.jcache;
import javax.annotation.Resource;
import javax.cache.CacheManager;
import javax.cache.Caching;
import javax.cache.configuration.MutableConfiguration;
......@@ -26,6 +25,7 @@ import org.junit.After;
import org.junit.Ignore;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CachingConfigurerSupport;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.config.AbstractCacheAnnotationTests;
......@@ -59,7 +59,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
}
protected CachingProvider getCachingProvider() {
return Caching.getCachingProvider();
return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider");
}
@After
......@@ -81,7 +81,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
@EnableCaching
static class EnableCachingConfig extends CachingConfigurerSupport {
@Resource
@Autowired
CachingProvider cachingProvider;
@Override
......@@ -93,7 +93,7 @@ public class JCacheEhCacheAnnotationTests extends AbstractCacheAnnotationTests {
@Bean
public CacheManager jCacheManager() {
CacheManager cacheManager = this.cachingProvider.getCacheManager();
MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<Object, Object>();
MutableConfiguration<Object, Object> mutableConfiguration = new MutableConfiguration<>();
mutableConfiguration.setStoreByValue(false); // otherwise value has to be Serializable
cacheManager.createCache("testCache", mutableConfiguration);
cacheManager.createCache("primary", mutableConfiguration);
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......@@ -48,7 +48,7 @@ public class JCacheEhCacheApiTests extends AbstractCacheTests<JCacheCache> {
}
protected CachingProvider getCachingProvider() {
return Caching.getCachingProvider();
return Caching.getCachingProvider("org.ehcache.jcache.JCacheCachingProvider");
}
@After
......@@ -58,7 +58,6 @@ public class JCacheEhCacheApiTests extends AbstractCacheTests<JCacheCache> {
}
}
@Override
protected JCacheCache getCache() {
return this.cache;
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......@@ -79,7 +79,7 @@ abstract class ConfigurationClassUtils {
*/
public static boolean checkConfigurationClassCandidate(BeanDefinition beanDef, MetadataReaderFactory metadataReaderFactory) {
String className = beanDef.getBeanClassName();
if (className == null) {
if (className == null || beanDef.getFactoryMethodName() != null) {
return false;
}
......
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
......@@ -18,6 +18,11 @@ package org.springframework.context.annotation;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.ProxyFactory;
......@@ -82,6 +87,16 @@ public class ContextAnnotationAutowireCandidateResolver extends QualifierAnnotat
public Object getTarget() {
Object target = beanFactory.doResolveDependency(descriptor, beanName, null, null);
if (target == null) {
Class<?> type = getTargetClass();
if (Map.class == type) {
return Collections.EMPTY_MAP;
}
else if (List.class == type) {
return Collections.EMPTY_LIST;
}
else if (Set.class == type || Collection.class == type) {
return Collections.EMPTY_SET;
}
throw new NoSuchBeanDefinitionException(descriptor.getResolvableType(),
"Optional dependency not present for lazy injection point");
}
......
......@@ -71,7 +71,7 @@ import org.springframework.core.env.ConfigurableEnvironment;
* {@code @Profile} can therefore not be used to select an overloaded method with a
* particular argument signature over another; resolution between all factory methods
* for the same bean follows Spring's constructor resolution algorithm at creation time.
* <b>Use distinct Java method names pointing to the same {@link @Bean#name bean name}
* <b>Use distinct Java method names pointing to the same {@link Bean#name bean name}
* if you'd like to define alternative beans with different profile conditions</b>;
* see {@code ProfileDatabaseConfig} in {@link Configuration @Configuration}'s javadoc.
*
......
......@@ -151,34 +151,38 @@ public class SimpleApplicationEventMulticaster extends AbstractApplicationEventM
* @param event the current event to propagate
* @since 4.1
*/
@SuppressWarnings({"unchecked", "rawtypes"})
protected void invokeListener(ApplicationListener listener, ApplicationEvent event) {
protected void invokeListener(ApplicationListener<?> listener, ApplicationEvent event) {
ErrorHandler errorHandler = getErrorHandler();
if (errorHandler != null) {
try {
listener.onApplicationEvent(event);
doInvokeListener(listener, event);
}
catch (Throwable err) {
errorHandler.handleError(err);
}
}
else {
try {
listener.onApplicationEvent(event);
}
catch (ClassCastException ex) {
String msg = ex.getMessage();
if (msg == null || msg.startsWith(event.getClass().getName())) {
// Possibly a lambda-defined listener which we could not resolve the generic event type for
Log logger = LogFactory.getLog(getClass());
if (logger.isDebugEnabled()) {
logger.debug("Non-matching event type for listener: " + listener, ex);
}
}
else {
throw ex;
doInvokeListener(listener, event);
}
}
@SuppressWarnings({"unchecked", "rawtypes"})
private void doInvokeListener(ApplicationListener listener, ApplicationEvent event) {
try {
listener.onApplicationEvent(event);
}
catch (ClassCastException ex) {
String msg = ex.getMessage();
if (msg == null || msg.startsWith(event.getClass().getName())) {
// Possibly a lambda-defined listener which we could not resolve the generic event type for
Log logger = LogFactory.getLog(getClass());
if (logger.isDebugEnabled()) {
logger.debug("Non-matching event type for listener: " + listener, ex);
}
}
else {
throw ex;
}
}
}
......
......@@ -75,7 +75,7 @@ import org.springframework.util.ReflectionUtils;
* instead. If you really need programmatic {@code #forExecutables} access, inject this class as
* a {@link ValidatorFactory} and call {@link #getValidator()} on it, then {@code #forExecutables}
* on the returned native {@link Validator} reference instead of directly on this class.
* Alternatively, call {@code #unwrap(Validator.class) which will also provide the native object.
* Alternatively, call {@code #unwrap(Validator.class)} which will also provide the native object.
*
* <p>This class is also being used by Spring's MVC configuration namespace, in case of the
* {@code javax.validation} API being present but no explicit Validator having been configured.
......@@ -353,7 +353,7 @@ public class LocalValidatorFactoryBean extends SpringValidatorAdapter
ReflectionUtils.invokeMethod(parameterNameProviderMethod, configuration, parameterNameProvider);
}
catch (Exception ex) {
catch (Throwable ex) {
// Bean Validation 1.1 API not available - simply not applying the ParameterNameDiscoverer
}
}
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......@@ -81,7 +81,7 @@ public class MethodValidationInterceptor implements MethodInterceptor {
}
private final Validator validator;
private volatile Validator validator;
/**
......@@ -116,7 +116,18 @@ public class MethodValidationInterceptor implements MethodInterceptor {
if (forExecutablesMethod != null) {
// Standard Bean Validation 1.1 API
Object execVal = ReflectionUtils.invokeMethod(forExecutablesMethod, this.validator);
Object execVal;
try {
execVal = ReflectionUtils.invokeMethod(forExecutablesMethod, this.validator);
}
catch (AbstractMethodError err) {
// Probably an adapter (maybe a lazy-init proxy) without BV 1.1 support
Validator nativeValidator = this.validator.unwrap(Validator.class);
execVal = ReflectionUtils.invokeMethod(forExecutablesMethod, nativeValidator);
// If successful, store native Validator for further use
this.validator = nativeValidator;
}
Method methodToValidate = invocation.getMethod();
Set<ConstraintViolation<?>> result;
......@@ -137,13 +148,11 @@ public class MethodValidationInterceptor implements MethodInterceptor {
}
Object returnValue = invocation.proceed();
result = (Set<ConstraintViolation<?>>) ReflectionUtils.invokeMethod(validateReturnValueMethod,
execVal, invocation.getThis(), methodToValidate, returnValue, groups);
if (!result.isEmpty()) {
throw new ConstraintViolationException(result);
}
return returnValue;
}
......
......@@ -51,7 +51,7 @@ import org.springframework.validation.SmartValidator;
* <p>Note that Bean Validation 1.1's {@code #forExecutables} method isn't supported
* on this adapter: We do not expect that method to be called by application code;
* consider {@link MethodValidationInterceptor} instead. If you really need programmatic
* {@code #forExecutables} access, call {@code #unwrap(Validator.class) which will
* {@code #forExecutables} access, call {@code #unwrap(Validator.class)} which will
* provide the native {@link Validator} object with {@code #forExecutables} support.
*
* @author Juergen Hoeller
......@@ -177,7 +177,9 @@ public class SpringValidatorAdapter implements SmartValidator, javax.validation.
* @see org.springframework.validation.FieldError#getField()
*/
protected String determineField(ConstraintViolation<Object> violation) {
return violation.getPropertyPath().toString();
String path = violation.getPropertyPath().toString();
int elementIndex = path.indexOf(".<");
return (elementIndex >= 0 ? path.substring(0, elementIndex) : path);
}
/**
......
......@@ -43,6 +43,9 @@ import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.QualifierAnnotationAutowireCandidateResolver;
import org.springframework.beans.factory.config.BeanDefinitionHolder;
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProcessor;
import org.springframework.beans.factory.support.ChildBeanDefinition;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.support.RootBeanDefinition;
......@@ -794,6 +797,12 @@ public class ConfigurationClassPostProcessorTests {
ctx.getBean("myTestBean", TestBean.class);
}
@Test
public void testBeanDefinitionRegistryPostProcessorConfig() {
ApplicationContext ctx = new AnnotationConfigApplicationContext(BeanDefinitionRegistryPostProcessorConfig.class);
assertTrue(ctx.getBean("myTestBean") instanceof TestBean);
}
// -------------------------------------------------------------------------
......@@ -860,8 +869,7 @@ public class ConfigurationClassPostProcessorTests {
@Configuration
static class UnloadedConfig {
public @Bean
Foo foo() {
public @Bean Foo foo() {
return new Foo();
}
}
......@@ -869,8 +877,7 @@ public class ConfigurationClassPostProcessorTests {
@Configuration
static class LoadedConfig {
public @Bean
Bar bar() {
public @Bean Bar bar() {
return new Bar(new Foo());
}
}
......@@ -884,9 +891,7 @@ public class ConfigurationClassPostProcessorTests {
@Configuration
public static class ScopedProxyConfigurationClass {
@Bean
@Lazy
@Scope(proxyMode = ScopedProxyMode.INTERFACES)
@Bean @Lazy @Scope(proxyMode = ScopedProxyMode.INTERFACES)
public ITestBean scopedClass() {
return new TestBean();
}
......@@ -1475,4 +1480,21 @@ public class ConfigurationClassPostProcessorTests {
public abstract TestBean getTestBean();
}
@Configuration
static class BeanDefinitionRegistryPostProcessorConfig {
@Bean
public static BeanDefinitionRegistryPostProcessor bdrpp() {
return new BeanDefinitionRegistryPostProcessor() {
@Override
public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) {
registry.registerBeanDefinition("myTestBean", new RootBeanDefinition(TestBean.class));
}
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) {
}
};
}
}
}
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
......@@ -18,6 +18,7 @@ package org.springframework.context.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.util.List;
import org.junit.Test;
......@@ -59,6 +60,24 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
@Test
public void testLazyResourceInjectionWithField() {
doTestLazyResourceInjection(FieldResourceInjectionBean.class);
AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext();
RootBeanDefinition abd = new RootBeanDefinition(FieldResourceInjectionBean.class);
abd.setScope(RootBeanDefinition.SCOPE_PROTOTYPE);
ac.registerBeanDefinition("annotatedBean", abd);
RootBeanDefinition tbd = new RootBeanDefinition(TestBean.class);
tbd.setLazyInit(true);
ac.registerBeanDefinition("testBean", tbd);
ac.refresh();
FieldResourceInjectionBean bean = ac.getBean("annotatedBean", FieldResourceInjectionBean.class);
assertFalse(ac.getBeanFactory().containsSingleton("testBean"));
assertFalse(bean.getTestBeans().isEmpty());
assertNull(bean.getTestBeans().get(0).getName());
assertTrue(ac.getBeanFactory().containsSingleton("testBean"));
TestBean tb = (TestBean) ac.getBean("testBean");
tb.setName("tb");
assertSame("tb", bean.getTestBean().getName());
}
@Test
......@@ -114,7 +133,7 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
fail("Should have thrown NoSuchBeanDefinitionException");
}
catch (NoSuchBeanDefinitionException ex) {
// expected;
// expected
}
}
......@@ -131,12 +150,14 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
OptionalFieldResourceInjectionBean bean = (OptionalFieldResourceInjectionBean) bf.getBean("annotatedBean");
assertNotNull(bean.getTestBean());
assertNotNull(bean.getTestBeans());
assertTrue(bean.getTestBeans().isEmpty());
try {
bean.getTestBean().getName();
fail("Should have thrown NoSuchBeanDefinitionException");
}
catch (NoSuchBeanDefinitionException ex) {
// expected;
// expected
}
}
......@@ -152,9 +173,16 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
@Autowired @Lazy
private TestBean testBean;
@Autowired @Lazy
private List<TestBean> testBeans;
public TestBean getTestBean() {
return this.testBean;
}
public List<TestBean> getTestBeans() {
return testBeans;
}
}
......@@ -163,9 +191,16 @@ public class LazyAutowiredAnnotationBeanPostProcessorTests {
@Autowired(required = false) @Lazy
private TestBean testBean;
@Autowired(required = false) @Lazy
private List<TestBean> testBeans;
public TestBean getTestBean() {
return this.testBean;
}
public List<TestBean> getTestBeans() {
return this.testBeans;
}
}
......
......@@ -46,6 +46,7 @@ import org.springframework.core.ResolvableType;
import org.springframework.core.annotation.Order;
import org.springframework.scheduling.support.TaskUtils;
import org.springframework.tests.sample.beans.TestBean;
import org.springframework.util.ReflectionUtils;
import static org.junit.Assert.*;
import static org.mockito.BDDMockito.*;
......@@ -447,6 +448,30 @@ public class ApplicationContextEventTests extends AbstractApplicationEventListen
context.close();
}
@Test
public void lambdaAsListenerWithErrorHandler() {
final Set<MyEvent> seenEvents = new HashSet<>();
StaticApplicationContext context = new StaticApplicationContext();
SimpleApplicationEventMulticaster multicaster = new SimpleApplicationEventMulticaster();
multicaster.setErrorHandler(ReflectionUtils::rethrowRuntimeException);
context.getBeanFactory().registerSingleton(
StaticApplicationContext.APPLICATION_EVENT_MULTICASTER_BEAN_NAME, multicaster);
ApplicationListener<MyEvent> listener = seenEvents::add;
context.addApplicationListener(listener);
context.refresh();
MyEvent event1 = new MyEvent(context);
context.publishEvent(event1);
context.publishEvent(new MyOtherEvent(context));
MyEvent event2 = new MyEvent(context);
context.publishEvent(event2);
assertSame(2, seenEvents.size());
assertTrue(seenEvents.contains(event1));
assertTrue(seenEvents.contains(event2));
context.close();
}
@Test
public void beanPostProcessorPublishesEvents() {
GenericApplicationContext context = new GenericApplicationContext();
......
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2017 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.
......@@ -18,6 +18,7 @@ package org.springframework.validation.beanvalidation;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import javax.validation.Validator;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import javax.validation.groups.Default;
......@@ -26,6 +27,10 @@ import org.junit.Test;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.support.StaticApplicationContext;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.AsyncAnnotationAdvisor;
......@@ -64,7 +69,6 @@ public class MethodValidationTests {
ac.close();
}
private void doTestProxyValidation(MyValidInterface proxy) {
assertNotNull(proxy.myValidMethod("value", 5));
try {
......@@ -115,6 +119,13 @@ public class MethodValidationTests {
}
}
@Test
public void testLazyValidatorForMethodValidation() {
AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(
LazyMethodValidationConfig.class, CustomValidatorBean.class, MyValidBean.class);
ctx.getBean(MyValidInterface.class).myValidMethod("value", 5);
}
@MyStereotype
public static class MyValidBean implements MyValidInterface<String> {
......@@ -165,4 +176,16 @@ public class MethodValidationTests {
public @interface MyValid {
}
@Configuration
public static class LazyMethodValidationConfig {
@Bean
public static MethodValidationPostProcessor methodValidationPostProcessor(@Lazy Validator validator) {
MethodValidationPostProcessor postProcessor = new MethodValidationPostProcessor();
postProcessor.setValidator(validator);
return postProcessor;
}
}
}
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2017 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.
......@@ -120,9 +120,8 @@ public abstract class AbstractEnvironment implements ConfigurableEnvironment {
*/
public AbstractEnvironment() {
customizePropertySources(this.propertySources);
if (this.logger.isDebugEnabled()) {
this.logger.debug(String.format(
"Initialized %s with PropertySources %s", getClass().getSimpleName(), this.propertySources));
if (logger.isDebugEnabled()) {