Skip to content

refactor(model): Make DataPacket fully mutable and fix Parcel reading#4431

Merged
jamesarich merged 1 commit into
mainfrom
fix/api-libs
Feb 3, 2026
Merged

refactor(model): Make DataPacket fully mutable and fix Parcel reading#4431
jamesarich merged 1 commit into
mainfrom
fix/api-libs

Conversation

@jamesarich

Copy link
Copy Markdown
Collaborator

Changed bytes and dataType in the DataPacket data class from val to var, making the entire class mutable.

This change fixes a bug in readFromParcel where it was unable to update these fields because they were immutable. The implementation of readFromParcel has been updated to correctly read bytes and dataType from the parcel.

A new Robolectric test has been added to verify that readFromParcel now correctly updates all fields of a DataPacket instance.

Changed `bytes` and `dataType` in the `DataPacket` data class from `val` to `var`, making the entire class mutable.

This change fixes a bug in `readFromParcel` where it was unable to update these fields because they were immutable. The implementation of `readFromParcel` has been updated to correctly read `bytes` and `dataType` from the parcel.

A new Robolectric test has been added to verify that `readFromParcel` now correctly updates all fields of a `DataPacket` instance.

Signed-off-by: James Rich <2199651+jamesarich@users.noreply.github.com>
@github-actions github-actions Bot added the bugfix PR tag label Feb 3, 2026
@codecov

codecov Bot commented Feb 3, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 8.60%. Comparing base (08184aa) to head (e4b3d88).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff            @@
##            main   #4431      +/-   ##
========================================
+ Coverage   8.36%   8.60%   +0.24%     
========================================
  Files        418     418              
  Lines      14318   14320       +2     
  Branches    2078    2078              
========================================
+ Hits        1197    1232      +35     
+ Misses     12890   12850      -40     
- Partials     231     238       +7     

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

@jamesarich jamesarich added this pull request to the merge queue Feb 3, 2026
Merged via the queue into main with commit 9dbc8b7 Feb 3, 2026
11 checks passed
@jamesarich jamesarich deleted the fix/api-libs branch February 3, 2026 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix PR tag

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant