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 Code.UnmarshalJSON to work with valid json only #1276

Merged
merged 6 commits into from
Oct 27, 2020

Conversation

dstdfx
Copy link
Contributor

@dstdfx dstdfx commented Oct 26, 2020

Fixes #1273

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 26, 2020

CLA Check
The committers are authorized under a signed CLA.

@codecov
Copy link

codecov bot commented Oct 26, 2020

Codecov Report

Merging #1276 into master will decrease coverage by 0.0%.
The diff coverage is 83.3%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #1276     +/-   ##
========================================
- Coverage    76.8%   76.8%   -0.1%     
========================================
  Files         122     122             
  Lines        5944    5953      +9     
========================================
+ Hits         4568    4574      +6     
- Misses       1129    1131      +2     
- Partials      247     248      +1     
Impacted Files Coverage Δ
codes/codes.go 89.6% <83.3%> (-10.4%) ⬇️

@dstdfx dstdfx changed the title Remove quotes from UnmarshalJSON Remove quotes from codes.Code byte representation in UnmarshalJSON Oct 26, 2020
CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Member

@XSAM XSAM left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for your contribution!

codes/codes.go Outdated Show resolved Hide resolved
@dstdfx dstdfx force-pushed the fix/codes-marshal-unmarshal branch from 6e5c86f to bc761ab Compare October 27, 2020 09:07
@dstdfx dstdfx changed the title Remove quotes from codes.Code byte representation in UnmarshalJSON Fix Code.UnmarshalJSON to work with valid json only Oct 27, 2020
@dstdfx dstdfx force-pushed the fix/codes-marshal-unmarshal branch from c4109e1 to bca44b6 Compare October 27, 2020 19:44
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

Thanks for cleaning this up. Sorry about the mess I left. 😞

@MrAlias MrAlias merged commit d98ad10 into open-telemetry:master Oct 27, 2020
@dstdfx dstdfx deleted the fix/codes-marshal-unmarshal branch October 28, 2020 05:48
@MrAlias MrAlias mentioned this pull request Nov 20, 2020
AzfaarQureshi pushed a commit to open-o11y/opentelemetry-go that referenced this pull request Dec 3, 2020
…#1276)

* Remove quotes from UnmarshalJSON

Signed-off-by: Daniil Rutskiy <[email protected]>

* Update CHANGELOG.md

Signed-off-by: Daniil Rutskiy <[email protected]>

* Fix issue number in CHANGELOG.md

* Fix 'Code.UnmarshalJSON' to work with valid json only

Signed-off-by: Daniil Rutskiy <[email protected]>

* Extend test data for TestCodeUnmarshalJSONErrorInvalidData

Signed-off-by: Daniil Rutskiy <[email protected]>

* Delete useless cond, extend test data

Signed-off-by: Daniil Rutskiy <[email protected]>
@pellared pellared added this to the untracked milestone Nov 8, 2024
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.

Codes fail on round trip marshal/unmarshal
5 participants