8000 Make KeyDecoder / KeyEncoder as trait by lxohi · Pull Request #1032 · circe/circe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Make KeyDecoder / KeyEncoder as trait #1032

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

Merged
merged 1 commit into from
Dec 18, 2018
Merged

Conversation

lxohi
Copy link
@lxohi lxohi commented Dec 13, 2018

Make KeyDecoder / KeyEncoder as trait instead of abstract class so they can be extend together.

@codecov-io
Copy link
codecov-io commented Dec 13, 2018

Codecov Report

Merging #1032 into master will increase coverage by 0.37%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1032      +/-   ##
==========================================
+ Coverage    85.2%   85.58%   +0.37%     
==========================================
  Files          75       75              
  Lines        2386     2386              
  Branches      173      174       +1     
==========================================
+ Hits         2033     2042       +9     
+ Misses        353      344       -9
Impacted Files Coverage Δ
...re/shared/src/main/scala/io/circe/KeyDecoder.scala 100% <ø> (+2.7%) ⬆️
...re/shared/src/main/scala/io/circe/KeyEncoder.scala 100% <ø> (ø) ⬆️
.../core/shared/src/main/scala/io/circe/Decoder.scala 93.2% <0%> (+0.3%) ⬆️
...rc/main/scala/io/circe/numbers/BiggerDecimal.scala 90.36% <0%> (+1.2%) ⬆️
...re/shared/src/main/scala/io/circe/JsonNumber.scala 96.2% <0%> (+5.06%) ⬆️
...d/src/main/scala/io/circe/NonEmptySeqDecoder.scala 100% <0%> (+8.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e26b743...4b36993. Read the comment docs.

@travisbrown
Copy link
Member

I've tended to default to abstract class in the past (in part because of the mess traits make of Java interop before 2.12), but I think it's reasonable for these type classes to be traits, if only for consistency with the non-key Decoder and Encoder. Thanks.

@travisbrown travisbrown merged commit 5a195f2 into circe:master Dec 18, 2018
@lxohi
Copy link
Author
lxohi commented Dec 18, 2018

Ah... I was forgot that trait with default method implementations cannot be used in Java before Scala2.12. Thank you for generously merge this pull request.

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
0