Skip to content

Add an ArchRule to ensure that the return type of a @Bean method is not private #46753

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

Closed
wants to merge 1 commit into from

Conversation

nosan
Copy link
Contributor

@nosan nosan commented Aug 9, 2025

See #46688

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 9, 2025
@nosan nosan changed the title Add an ArchRule to ensure that the return type does not have the private modifier Add an ArchRule to ensure that the return type of a @Bean method is not private Aug 9, 2025
@snicoll
Copy link
Member

snicoll commented Aug 10, 2025

@nosan I wonder if that would be possible to restrict this to production code. This would reduce the knock-off effect as we have no intention to invoke AOT processing on our own tests at this time.

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label Aug 10, 2025
@nosan
Copy link
Contributor Author

nosan commented Aug 10, 2025

@snicoll Agreed, added rules only for main sources.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels Aug 10, 2025
Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
@snicoll snicoll self-assigned this Aug 11, 2025
@snicoll snicoll added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Aug 11, 2025
@snicoll snicoll added this to the 3.4.9 milestone Aug 11, 2025
snicoll pushed a commit that referenced this pull request Aug 11, 2025
See gh-46753

Signed-off-by: Dmytro Nosan <dimanosan@gmail.com>
@snicoll snicoll closed this in 95d9b39 Aug 11, 2025
@snicoll
Copy link
Member

snicoll commented Aug 11, 2025

Good stuff @nosan, thanks again!

@nosan
Copy link
Contributor Author

nosan commented Aug 11, 2025

Thanks, @snicoll
May I ask you to close this issue #46688?

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

Successfully merging this pull request may close these issues.

3 participants