-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Number converters should not fall through and throw exceptions in non NETCore builds #7753
Merged
Conversation
This file contains 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
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
💚 CLA has been signed |
…nverter should not fall through to always throw a JSONException for non NETCore builds
5fb3487
to
89a099c
Compare
stevejgordon
approved these changes
Jun 29, 2023
flobernd
pushed a commit
that referenced
this pull request
Jul 10, 2023
…nverter should not fall through to always throw a JSONException for non NETCore builds (#7753)
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
github-actions bot
pushed a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
flobernd
added a commit
that referenced
this pull request
Jul 11, 2023
* DoubleWithFractionalPortionConverter and FloatWithFractionalPortionConverter should not fall through to always throw a JSONException for non NETCore builds (#7753) * Complted buckets JSON converter (#7738) * Boosted non-exhaustive enum deserialization (#7737) * Optimized `FieldConverter` (#7736) * Removed unused JsonIgnore (#7735) * Fixed the equality contract on Metrics type (#7733) * No allocations in ResponseItem IsValid prop (#7731) * Refactoring and tiny behavior fix for Ids (#7730) --------- Co-authored-by: Florian Bernd <[email protected]> Co-authored-by: Karl-Johan Sjögren <[email protected]> Co-authored-by: Yoh Deadfall <[email protected]>
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.
In both
DoubleWithFractionalPortionConverter
andFloatWithFractionalPortionConverter
, when building for non NETCore there is a missingreturn
statement that makes the code always fall through intoThrowHelper.ThrowJsonException($"Unable to serialize float value.");
This fix just adds the missing
return
statements. I can't find that tests are run for net4x (which I guess is how this was unnoticed) so I haven't tried adding any new tests to cover this case.Fixes #7757