kotlin-ipv8
kotlin-ipv8 copied to clipboard
Update Serialization.kt with auto functionality
Closes #87 Closes #86
(cherry picked from commit 3e4a42dc19910fe9d128c0034d754b94db0d343f)
This pull requests fixes the two mentioned issues or design flaws related to Int and UShort transit. If permitted, I would just change the signature of the original UShort functions and all the usages in the code to explicitly cast the data before sending to (de)serializer.
This also includes functions to automatically select the proper (de)serializer based on the underlying, allowing for more clean code in simple cases.
I was not able to automatically perform deserialization due to issues with typing of static classes and usage of Companion, as such it has been left out for now.
Codecov Report
Attention: Patch coverage is 88.23529% with 6 lines in your changes are missing coverage. Please review.
Project coverage is 58.73%. Comparing base (
476dc36) to head (6ff3d74).
| Files | Patch % | Lines |
|---|---|---|
| ...in/java/nl/tudelft/ipv8/messaging/Serialization.kt | 88.23% | 6 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #88 +/- ##
============================================
+ Coverage 58.62% 58.73% +0.10%
Complexity 702 702
============================================
Files 107 107
Lines 4553 4553
Branches 632 632
============================================
+ Hits 2669 2674 +5
+ Misses 1552 1549 -3
+ Partials 332 330 -2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.