Skip to content

Commit

Permalink
Removes setting FactoryBean.OBJECT_TYPE_ATTRIBUTE
Browse files Browse the repository at this point in the history
It was previously ignored, changing it to a class introduces behaviour that breaks aot.

This is required by spring-projects/spring-framework@a6ff95a
  • Loading branch information
spencergibb committed Aug 15, 2023
1 parent 7798ede commit 3fc733f
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,6 @@ private void eagerlyRegisterFeignClientBeanDefinition(String className, Map<Stri
// code
definition.addPropertyValue("qualifiers", qualifiers);
AbstractBeanDefinition beanDefinition = definition.getBeanDefinition();
Class<?> type = ClassUtils.resolveClassName(className, null);
beanDefinition.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE, type);
// has a default, won't be null
boolean primary = (Boolean) attributes.get("primary");
beanDefinition.setPrimary(primary);
Expand Down

1 comment on commit 3fc733f

@artur1211
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spencergibb This seems to fix problems with spring-projects/spring-framework#29799, but I can see that there is still one place in code where FactoryBean.OBJECT_TYPE_ATTRIBUTE is set as String:

beanDefinition.setAttribute(FactoryBean.OBJECT_TYPE_ATTRIBUTE, className);

I haven't analyzed it deeply, but it seems that it could still cause problems in some situations.

Please sign in to comment.