Fix Dart native nullable number deserialization (#20238)#24386
Open
edwinnyawoli wants to merge 2 commits into
Open
Fix Dart native nullable number deserialization (#20238)#24386edwinnyawoli wants to merge 2 commits into
edwinnyawoli wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Member
|
thanks for the PR cc @jaumard (2018/09) @amondnet (2019/12) @sbu-WBT (2020/12) @kuhnroyal (2020/12) @agilob (2020/12) @ahmednfwela (2021/08) please review the feedback from cubic-dev-ai to see if that's valid. |
…on/native/native_class.mustache This is actually valid Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Author
|
@wing328 The feedback was actually valid so I've applied it |
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.
Fix Dart native serialization for optional number fields by guarding against null before calling num.parse(). Includes regression coverage in
dart-native-deserialization-bugs.yamland Dart client codegen tests.Summary by cubic
Fix Dart native model deserialization to guard optional number fields (including non-nullable) against null before parsing, preventing crashes when JSON contains null. Adds regression tests covering
OptionalNumberModel.problem.num.parse()for non-required numeric fields indart2/serialization/native/native_class.mustache, regardless ofnullable.optional_number_model.dart.Written for commit 662902c. Summary will update on new commits.