From 009d2a5efd456a37c29fd984be3087f09082c325 Mon Sep 17 00:00:00 2001 From: Phillip Webb Date: Mon, 25 Feb 2013 15:35:13 -0800 Subject: [PATCH] Remove unnecessary null check in SysEnvPropSource Remove unnecessary null check and dead code from SystemEnvironmentPropertySource. Issue: SPR-10318 --- .../core/env/SystemEnvironmentPropertySource.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/spring-core/src/main/java/org/springframework/core/env/SystemEnvironmentPropertySource.java b/spring-core/src/main/java/org/springframework/core/env/SystemEnvironmentPropertySource.java index 09082aad5c..0baba6a8c1 100644 --- a/spring-core/src/main/java/org/springframework/core/env/SystemEnvironmentPropertySource.java +++ b/spring-core/src/main/java/org/springframework/core/env/SystemEnvironmentPropertySource.java @@ -88,10 +88,6 @@ public class SystemEnvironmentPropertySource extends MapPropertySource { public Object getProperty(String name) { Assert.notNull(name, "property name must not be null"); String actualName = resolvePropertyName(name); - if (actualName == null) { - // at this point we know the property does not exist - return null; - } if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug(String.format( "PropertySource [%s] does not contain '%s', but found equivalent '%s'",