Skip to content

Conversation

quaff
Copy link
Contributor

@quaff quaff commented Jul 2, 2025

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jul 2, 2025
@philwebb
Copy link
Member

philwebb commented Jul 3, 2025

Those are actually intentional and we plan to adopt them more widely (but we're not ready to do that yet so please don't submit a PR :) )

The idea is that the class is public so that it can be excluded, but the constructor is package private to stop folks using or extending them directly because we consider auto-configuration classes to not be public API.

@philwebb philwebb closed this Jul 3, 2025
@philwebb philwebb added status: declined A suggestion or change that we don't feel we should currently apply and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 3, 2025
@quaff
Copy link
Contributor Author

quaff commented Jul 8, 2025

@philwebb Is it possible to generate package private constructor by annotation processor?

@philwebb
Copy link
Member

philwebb commented Jul 8, 2025

I think we'd rather just keep it simple and add them manually.

@wilkinsona
Copy link
Member

I thought we'd decided on making them final rather than adding package-private constructors, hence the update to the title of #32883.

@philwebb
Copy link
Member

philwebb commented Jul 8, 2025

I can't remember where we landed. Using final would stop subclassing, using a package private constructor would stop folks delegating. Perhaps it's a step too far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: declined A suggestion or change that we don't feel we should currently apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants