This is an invalid 'if'
BeanDefinitionReaderUtils.generateBeanName
String id = generatedBeanName;
if (isInnerBean) {
// Inner bean: generate identity hashcode suffix.
id = generatedBeanName + GENERATED_BEAN_NAME_SEPARATOR + ObjectUtils.getIdentityHexString(definition);
}
else {
// Top-level bean: use plain class name with unique suffix if necessary.
return uniqueBeanName(generatedBeanName, registry);
}
return id;
Comment From: sbrannen
Although the code in question is implemented slightly unusually, there is nothing invalid about the if-block technically speaking.
Having said that, I'll take this opportunity to improve the readability of that code.
So thanks for bringing this to our attention.