Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractRepositoryConfigurationSourceSupport does not override registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry) #22480

Closed
dsyer opened this issue Jul 21, 2020 · 1 comment
Labels
type: bug A general bug
Milestone

Comments

@dsyer
Copy link
Member

dsyer commented Jul 21, 2020

AbstractRepositoryConfigurationSourceSupport overrides one of the registerBeanDefinitions() method in ImportBeanDefinitionRegistrar but not the other. The other one has an empty default implementation, so if anyone calls it, nothing happens. It would be helpful to add an implementation, even if it just throws an exception (hopefully it wouldn't need to).

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 21, 2020
@philwebb philwebb added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 22, 2020
@philwebb philwebb added this to the 2.3.x milestone Jul 22, 2020
@wilkinsona wilkinsona changed the title Add implementation for empty registerBeanDefinitions() method AbstractRepositoryConfigurationSourceSupport does not override registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry) Jul 23, 2020
@wilkinsona
Copy link
Member

wilkinsona commented Jul 24, 2020

The BeanNameGenerator that's missing when registerBeanDefinitions(AnnotationMetadata, BeanDefinitionRegistry) is called is eventually passed into an AnnotationRepositoryConfigurationSource constructor where it's marked as @Nullable. It looks like we can safely implement the missing override as follows:

@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
	registerBeanDefinitions(importingClassMetadata, registry, null);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants