Conversation
superwall/src/main/java/com/superwall/sdk/storage/core_data/Converters.kt
Show resolved
Hide resolved
superwall/src/main/java/com/superwall/sdk/storage/core_data/Converters.kt
Outdated
Show resolved
Hide resolved
…nverters.kt Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes in this pull request
2.7.8
Fixes
Checklist
CHANGELOG.mdfor any breaking changes, enhancements, or bug fixes.ktlintin the main directory and fixed any issues.Greptile Summary
This is a small patch release (2.7.7 → 2.7.8) that ships two targeted bug fixes: adding
SupervisorJob()toIOScope/MainScopeso that a failing child coroutine no longer cancels the whole scope (fixing test-mode cancellation), and addingDatesupport to the RoomConverters— both in thesanitizeMapallow-list and as an R8-safe Java-reflection fallback inconvertToJsonElement.Key changes:
Scopes.kt—SupervisorJob()prepended to both scope contexts; clean and correct fix.Converters.kt—Dateadded tosanitizeMapfilter; R8 fallbackelsebranch added inconvertToJsonElement. The fallback has a misleading comment ("string representation") that does not match the actual behaviour (JsonNullis returned for non-Date unknowns, not a string). Additionally, thethis != nullguard inside theelsebranch is redundant becausenullis already matched earlier in thewhenexpression.CHANGELOG.md/version.env— version bumped to 2.7.8.Confidence Score: 4/5
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Any?.convertToJsonElement] --> B{when this} B -->|null| C[JsonNull] B -->|String / Number / Boolean| D[JsonPrimitive] B -->|Date - Kotlin is check| E[JsonPrimitive - date.time] B -->|JSONArray / JSONObject| F[JsonArray / JsonObject] B -->|List / Array / Map| G[JsonArray / JsonObject] B -->|else - R8 fallback| H{Date::class.java.isInstance?} H -->|yes| I[JsonPrimitive - date.time] H -->|no| J[JsonNull - silent data loss] subgraph Scopes K[IOScope / MainScope] --> L[SupervisorJob + Dispatcher + ExceptionHandler] L --> M[Child failure does NOT cancel parent scope] endPrompt To Fix All With AI
Last reviewed commit: 6b351c1