Fix alias resolution error message in SimpleAliasRegistry
Prior to this commit, the alias resolution error message in SimpleAliasRegistry was misleading. When a resolution conflict is detected, the IllegalStateException thrown by resolveAliases(...) now states that the resolved alias is already registered for an `existingName` instead of the `registeredName`. See gh-31353 Closes gh-32025
This commit is contained in:
@@ -172,7 +172,7 @@ public class SimpleAliasRegistry implements AliasRegistry {
|
||||
throw new IllegalStateException(
|
||||
"Cannot register resolved alias '" + resolvedAlias + "' (original: '" + alias +
|
||||
"') for name '" + resolvedName + "': It is already registered for name '" +
|
||||
registeredName + "'.");
|
||||
existingName + "'.");
|
||||
}
|
||||
checkForAliasCircle(resolvedName, resolvedAlias);
|
||||
this.aliasMap.remove(alias);
|
||||
|
||||
Reference in New Issue
Block a user