From b73c5315272dac5de69647e217eb2847e874c0c0 Mon Sep 17 00:00:00 2001 From: Juergen Hoeller Date: Thu, 21 Aug 2014 22:46:33 +0200 Subject: [PATCH] PropertySource implementations perform conversion to String arrays via StringUtils (getting rid of EMPTY_NAMES_ARRAY) --- .../core/env/EnumerablePropertySource.java | 2 -- .../org/springframework/core/env/MapPropertySource.java | 6 ++++-- .../springframework/core/env/MutablePropertySources.java | 3 ++- .../web/context/support/ServletConfigPropertySource.java | 7 +++---- .../web/context/support/ServletContextPropertySource.java | 8 ++++---- .../web/portlet/context/PortletConfigPropertySource.java | 7 ++++--- .../web/portlet/context/PortletContextPropertySource.java | 7 ++++--- 7 files changed, 21 insertions(+), 19 deletions(-) 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 5c30764f63..bcd220e6dd 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,8 +45,6 @@ import org.springframework.util.Assert; */ public abstract class EnumerablePropertySource extends PropertySource { - 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 b8b62706c1..b8537bed63 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