Polishing

This commit is contained in:
Juergen Hoeller
2022-01-19 13:54:03 +01:00
parent 537aced28b
commit 86be03945b

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2022 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.
@@ -32,6 +32,7 @@ import org.springframework.util.StringValueResolver;
/**
* Simple implementation of the {@link AliasRegistry} interface.
*
* <p>Serves as base class for
* {@link org.springframework.beans.factory.support.BeanDefinitionRegistry}
* implementations.
@@ -101,8 +102,8 @@ public class SimpleAliasRegistry implements AliasRegistry {
*/
public boolean hasAlias(String name, String alias) {
String registeredName = this.aliasMap.get(alias);
return ObjectUtils.nullSafeEquals(registeredName, name) || (registeredName != null
&& hasAlias(name, registeredName));
return ObjectUtils.nullSafeEquals(registeredName, name) ||
(registeredName != null && hasAlias(name, registeredName));
}
@Override