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

Property map serializable type#1250 #1340

Merged
merged 4 commits into from
Feb 20, 2024

Conversation

BeckFW
Copy link
Contributor

@BeckFW BeckFW commented Feb 12, 2024

Adding SerializableType to PropertyMap to close #1250. Also includes documentation and test case.

@artemijsem

@codecov-commenter
Copy link

codecov-commenter commented Feb 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ed749b8) 59.48% compared to head (20159c2) 59.53%.
Report is 6 commits behind head on dev.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #1340      +/-   ##
============================================
+ Coverage     59.48%   59.53%   +0.05%     
- Complexity     2980     2986       +6     
============================================
  Files           312      312              
  Lines         15331    15335       +4     
  Branches       1561     1561              
============================================
+ Hits           9119     9130      +11     
+ Misses         5691     5684       -7     
  Partials        521      521              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Owner

@AlmasB AlmasB left a comment

Choose a reason for hiding this comment

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

Thanks, looks good, please check the comment

}

override fun read(bundle: Bundle) {
bundle.data.forEach { (key) ->
Copy link
Owner

Choose a reason for hiding this comment

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

bundle.data is a Map<String, Serializable>, so forEach { key, value -> ... } should be possible, in which case bundle.get(key) can be replaced by just value and avoid extra value lookups.

Please check the above is true and update if so.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

toValue(bundle.get(key)) has been replaced by toValue(value.toString()). Using value directly caused tests to fail. Still avoids the extra lookup from before.

@AlmasB
Copy link
Owner

AlmasB commented Feb 20, 2024

Brilliant, thank you

@AlmasB AlmasB merged commit 6c00330 into AlmasB:dev Feb 20, 2024
5 of 6 checks passed
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.

PropertyMap should have SerializableType
3 participants