Skip to content

MessageSourceMessageInterpolator does not replace a parameter when the message matches its code #45212

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 Apr 16, 2025

See #42782

…tMessage

This commit addresses an issue where placeholders like {foo}
remain as {foo} if the message is the same as its code.

Signed-off-by: Dmytro Nosan <[email protected]>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Apr 16, 2025
@wilkinsona wilkinsona added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 16, 2025
@wilkinsona wilkinsona added this to the 3.5.x milestone Apr 16, 2025
@wilkinsona wilkinsona self-assigned this Apr 16, 2025
@wilkinsona wilkinsona changed the title Improve MessageSourceMessageInterpolator when using MessageSource with the code as a default message MessageSourceMessageInterpolator does not replace a parameter when the message matches its code Apr 16, 2025
@wilkinsona
Copy link
Member

As far as I can tell, this is also a problem when useCodeAsDefaultMessage is false and I've convinced myself that we should treat it as a bug.

@wilkinsona wilkinsona added type: bug A general bug and removed type: enhancement A general enhancement labels Apr 16, 2025
@wilkinsona wilkinsona modified the milestones: 3.5.x, 3.3.x Apr 16, 2025
wilkinsona pushed a commit to wilkinsona/spring-boot that referenced this pull request Apr 16, 2025
This commit addresses an issue where placeholders like {foo}
remain as {foo} if the message is the same as its code.

See spring-projectsgh-45212

Signed-off-by: Dmytro Nosan <[email protected]>
wilkinsona added a commit to wilkinsona/spring-boot that referenced this pull request Apr 16, 2025
@wilkinsona wilkinsona modified the milestones: 3.3.x, 3.3.11 Apr 16, 2025
@wilkinsona
Copy link
Member

Thanks again, @nosan.

@nosan
Copy link
Contributor Author

nosan commented Apr 16, 2025

Thanks, @wilkinsona 👍

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

Successfully merging this pull request may close these issues.

3 participants