Skip to content

Remove redundant properties from additional-spring-configuration-metadata.json#49743

Open
quaff wants to merge 1 commit intospring-projects:mainfrom
quaff:patch-208
Open

Remove redundant properties from additional-spring-configuration-metadata.json#49743
quaff wants to merge 1 commit intospring-projects:mainfrom
quaff:patch-208

Conversation

@quaff
Copy link
Contributor

@quaff quaff commented Mar 25, 2026

Which can be inferred from @ConfigurationProperties classes.

…data.json

Which can be inferred from `@ConfigurationProperties` classes.

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 25, 2026
@snicoll
Copy link
Member

snicoll commented Mar 25, 2026

Which can be inferred from @ConfigurationProperties classes.

Nothing can really be inferred as the default is null. As a companion to this change, I'd rather have the strategy initialized to ConstructorDetector.DEFAULT. Right now, this PR removes the actual defaut value that's hidden behind that null.

I am wondering if I am misssing something, flagging for team attention.

@snicoll snicoll added the for: team-attention An issue we'd like other members of the team to review label Mar 25, 2026
@quaff
Copy link
Contributor Author

quaff commented Mar 25, 2026

Right now, this PR removes the actual defaut value that's hidden behind that null.

In the other words, this PR fix wrong default value.

@snicoll
Copy link
Member

snicoll commented Mar 25, 2026

In the other words, this PR fix wrong default value.

Yes, but no. The default in configuration properties is null, but in practice this delegates to Jackson which uses DEFAULT. So my question is whether we should set the value in the configuration properties to DEFAULT to remove that ambiguity. We'll see if the team has an opinion or some context I am missing.

@wilkinsona
Copy link
Member

Jackson seems to use null as its default but then coerces this to DEFAULT in both Jackson 2 and Jackson 3. I haven't spotted a reason for us not to use DEFAULT as our default in the properties class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for: team-attention An issue we'd like other members of the team to review status: waiting-for-triage An issue we've not yet triaged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants