Skip to content
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

fix: skip streaming data for union check in readPayload #1426

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Oct 4, 2024

fix conditional branching for union readPayload codegen

@kuhe kuhe requested review from a team as code owners October 4, 2024 17:24
@kuhe kuhe requested a review from kstich October 4, 2024 17:24
@@ -2479,7 +2481,7 @@ private HttpBinding readPayload(
target.getType()));
}

if (target instanceof UnionShape) {
if (!isStreaming && target instanceof UnionShape) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is to match the condition on line 2472

} else if (target instanceof UnionShape) {

which isn't only target instanceof UnionShape but also that the prior if branch was not entered.

@kuhe kuhe merged commit 5c4370a into smithy-lang:main Oct 4, 2024
11 checks passed
@kuhe kuhe deleted the fix/codegen branch October 4, 2024 18:34
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.

3 participants