-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
ArC: add validation of synthetic bean types #46794
Conversation
So far, bean types of synthetic beans were not validated, so it was possible to create synthetic beans with illegal bean types. This commit fixes that. If a synthetic bean has an illegal type, definition error occurs.
One question I have is: in case of declared beans, illegal bean types don't cause a definition error, they are just removed from the set of bean types. It seems to me that in case of synthetic beans, it is better to fail immediately, because the types are not discovered by the container, they are added by the user, so they probably want to know they're doing something wrong. But it is not consistent with other kinds of beans. |
I do agree.
It's not the only inconsistency between synthetic and regular beans 🤷. |
This comment has been minimized.
This comment has been minimized.
Status for workflow
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems to me that in case of synthetic beans, it is better to fail immediately, because the types are not discovered by the container, they are added by the user, so they probably want to know they're doing something wrong.
Definitely agree, thanks for the PR and tests 👍
So far, bean types of synthetic beans were not validated, so it was possible to create synthetic beans with illegal bean types. This commit fixes that. If a synthetic bean has an illegal type, definition error occurs.
Fixes #46771