Skip to content

Conversation

kilink
Copy link
Contributor

@kilink kilink commented Jun 10, 2025

Use String.replace instead of replaceAll in MetadataEncoder; since Java 9, String.replace no longer uses a regex, while replaceAll does. The use case here of replacing a single character does not require a regex.

Note: I was tired of seeing this 5-year old blog that discusses the issue and points to this exact line of code and decided to just fix it.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Jun 10, 2025
@bclozel bclozel self-assigned this Jun 11, 2025
@bclozel bclozel added in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 11, 2025
@bclozel bclozel added this to the 7.0.x milestone Jun 11, 2025
@bclozel
Copy link
Member

bclozel commented Jun 11, 2025

Sorry to bother you with this @kilink , could you sign off your contribution for the DCO check please?

git amend -s && git push --force should do the trick on your local branch.

Use String.replace instead of replaceAll in MetadataEncoder; since Java 9, String.replace
no longer uses a regex, while replaceAll does. The use case here of replacing a single
character does not require a regex.

Signed-off-by: Patrick Strawderman <[email protected]>
@kilink kilink force-pushed the metadata-encoder-replace branch from a2a47f1 to 3d0836f Compare June 11, 2025 19:25
@kilink
Copy link
Contributor Author

kilink commented Jun 11, 2025

Sorry to bother you with this @kilink , could you sign off your contribution for the DCO check please?

git amend -s && git push --force should do the trick on your local branch.

I keep forgetting to do that. Thanks!

@bclozel bclozel modified the milestones: 7.0.x, 7.0.0-M6 Jun 12, 2025
@bclozel bclozel closed this in fd2038c Jun 12, 2025
@bclozel
Copy link
Member

bclozel commented Jun 12, 2025

Thanks @kilink !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: messaging Issues in messaging modules (jms, messaging) type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants