try {
for(AliasDefinition nextAliasDefinition : aliases()) {
if(nextAliasDefinition.getName().equals(aliasName)) {
if(scenarioName != null) {
AliasOverride scenarioAlias = persistentAliasDefinitionsData.getData().getScenarioAliases(nextAliasDefinition.getName()).get(scenarioName);
if(scenarioAlias != null) {
nextAliasDefinition = new AliasDefinition(nextAliasDefinition.getName(), scenarioAlias.getClassName(), nextAliasDefinition.getInterfaceName());
}
}
if(aliasDefinition != null) {
throw new AmbiguousAliasException(aliasDefinitionsFile, aliasName, scenarioName);