Fix scalar message header conversion to nullable enums - #689
Merged
dgafka merged 2 commits intoJul 28, 2026
Merged
Conversation
Contributor
Author
|
@dgafka Hi, I need your help :) |
lifinsky
force-pushed
the
bug/nullable-enum-header-conversion
branch
from
July 23, 2026 13:46
9124bba to
b22a1e4
Compare
lifinsky
force-pushed
the
bug/nullable-enum-header-conversion
branch
from
July 23, 2026 14:16
b22a1e4 to
d93deed
Compare
dgafka
approved these changes
Jul 28, 2026
dgafka
left a comment
Member
There was a problem hiding this comment.
Make sense, thanks for the fix :)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix scalar message header conversion for nullable enum handler parameters.
Problem
When a message handler declares a nullable enum header parameter:
Ecotone represents the target type as the
DeliveryMethod|nullunion.ScalarToEnumConvertercorrectly recognizes the target as an enum-compatible type, but then passes the complete union type string toReflectionEnum. This results in the following error for a non-null scalar header value:A missing header or a header with a
nullvalue is not affected because scalar-to-enum conversion is not required in that case.Fix
When the target is a union type, remove
nullbefore creatingReflectionEnumand converting the scalar value to the enum case.Commit Structure
ScalarToEnumConverter.Verification
Before the fix, the regression test fails with:
After the fix:
The existing Core test suite also passes.
Pull Request Contribution Terms