Skip to content

Fix AOT generation for hyphenated binder names - #3267

Closed
arimu1 wants to merge 1 commit into
spring-cloud:mainfrom
arimu1:fix/3118-aot-hyphenated-binder
Closed

arimu1 wants to merge 1 commit into
spring-cloud:mainfrom
arimu1:fix/3118-aot-hyphenated-binder

Conversation

@arimu1

@arimu1 arimu1 commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Sanitize binder names to valid Java identifiers when generating AOT child context classes and initializer variables.
  • Keep runtime binder lookup keyed on the original configured name (e.g. solace-broker).

Fixes gh-3118

Test plan

  • ./mvnw -pl core/spring-cloud-stream -am test -Dtest=BinderChildContextInitializerTests
  • Added shouldStartHyphenatedBinderChildContextsFromAotContributions with mock-binder-1 / mock-binder-2 config

Sanitize binder names when generating AOT child context code so JavaPoet
produces valid identifiers while runtime lookup keeps configured names.

Fixes spring-cloudgh-3118

Signed-off-by: arimu1 <19286898+arimu1@users.noreply.github.com>
@olegz olegz closed this in 472e6d6 Sep 15, 2026
@olegz olegz added this to the 5.0.4 milestone Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AOT Builds fail if binder name contains a "-" character

2 participants