diff --git a/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java b/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java index f5d3b6e9e6d..470f8c657b1 100644 --- a/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/EnumerablePropertySource.java @@ -45,6 +45,7 @@ import org.springframework.util.Assert; */ public abstract class EnumerablePropertySource extends PropertySource { + @Deprecated protected static final String[] EMPTY_NAMES_ARRAY = new String[0]; protected final Log logger = LogFactory.getLog(getClass()); diff --git a/spring-core/src/main/java/org/springframework/core/env/MapPropertySource.java b/spring-core/src/main/java/org/springframework/core/env/MapPropertySource.java index b8b62706c1b..b8537bed635 100644 --- a/spring-core/src/main/java/org/springframework/core/env/MapPropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/MapPropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2014 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,8 @@ package org.springframework.core.env; import java.util.Map; +import org.springframework.util.StringUtils; + /** * {@link PropertySource} that reads keys and values from a {@code Map} object. * @@ -38,7 +40,7 @@ public class MapPropertySource extends EnumerablePropertySource propertySource) { @@ -184,7 +185,7 @@ public class MutablePropertySources implements PropertySources { } @Override - public synchronized String toString() { + public String toString() { String[] names = new String[this.size()]; for (int i=0; i < size(); i++) { names[i] = this.propertySourceList.get(i).getName(); @@ -202,7 +203,7 @@ public class MutablePropertySources implements PropertySources { } /** - * Log the removal of the given propertySource if it is present. + * Remove the given property source if it is present. */ protected void removeIfPresent(PropertySource propertySource) { if (this.propertySourceList.contains(propertySource)) { diff --git a/spring-web/src/main/java/org/springframework/web/context/support/ServletConfigPropertySource.java b/spring-web/src/main/java/org/springframework/web/context/support/ServletConfigPropertySource.java index c933827cff3..212b9a302df 100644 --- a/spring-web/src/main/java/org/springframework/web/context/support/ServletConfigPropertySource.java +++ b/spring-web/src/main/java/org/springframework/web/context/support/ServletConfigPropertySource.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2011 the original author or authors. + * Copyright 2002-2014 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. @@ -20,7 +20,7 @@ import javax.servlet.ServletConfig; import org.springframework.core.env.EnumerablePropertySource; import org.springframework.core.env.PropertySource; -import org.springframework.util.CollectionUtils; +import org.springframework.util.StringUtils; /** * {@link PropertySource} that reads init parameters from a {@link ServletConfig} object. @@ -37,8 +37,7 @@ public class ServletConfigPropertySource extends EnumerablePropertySource