diff --git a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java index 640e712e89..9145c73f09 100644 --- a/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java +++ b/spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractBeanFactory.java @@ -1648,7 +1648,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp return beanInstance; } if (!(beanInstance instanceof FactoryBean)) { - throw new BeanIsNotAFactoryException(transformedBeanName(name), beanInstance.getClass()); + throw new BeanIsNotAFactoryException(beanName, beanInstance.getClass()); } }