Remove unnecessary null check in SysEnvPropSource
Remove unnecessary null check and dead code from SystemEnvironmentPropertySource. Issue: SPR-10318
This commit is contained in:
@@ -88,10 +88,6 @@ public class SystemEnvironmentPropertySource extends MapPropertySource {
|
|||||||
public Object getProperty(String name) {
|
public Object getProperty(String name) {
|
||||||
Assert.notNull(name, "property name must not be null");
|
Assert.notNull(name, "property name must not be null");
|
||||||
String actualName = resolvePropertyName(name);
|
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)) {
|
if (logger.isDebugEnabled() && !name.equals(actualName)) {
|
||||||
logger.debug(String.format(
|
logger.debug(String.format(
|
||||||
"PropertySource [%s] does not contain '%s', but found equivalent '%s'",
|
"PropertySource [%s] does not contain '%s', but found equivalent '%s'",
|
||||||
|
|||||||
Reference in New Issue
Block a user