Conversation
Greptile SummaryThis PR bumps the Android SDK to v24.0.0, upgrades The new Confidence Score: 4/5Safe to merge with awareness of the previously-flagged userPhone nullable crash and the minor updateFn concurrency inconsistency. The userPhone: String non-nullable crash remains unaddressed and can cause a ClassCastException when membership privacy is enabled. All other new findings are P2. The Realtime redesign itself is architecturally sound. Membership.kt (non-nullable userPhone) and Realtime.kt (updateFn double-check). Important Files Changed
Reviews (5): Last reviewed commit: "chore: update Android SDK to 24.0.0" | Re-trigger Greptile |
Made-with: Cursor
Made-with: Cursor
| @SerializedName("userPhone") | ||
| val userPhone: String, |
There was a problem hiding this comment.
userPhone declared non-nullable, will crash when privacy is enabled
userPhone is typed as String (non-nullable). The API docs note "Hide this attribute by toggling membership privacy in the Console," meaning the field can be absent or null in the response. When Membership.from(map) executes map["userPhone"] as String against a response that omits this key, map["userPhone"] returns null, and the unchecked cast throws a ClassCastException, crashing the caller.
Declare the field as String? (nullable) and update from() accordingly:
| @SerializedName("userPhone") | |
| val userPhone: String, | |
| @SerializedName("userPhone") | |
| val userPhone: String? |
This PR contains updates to the SDK for version 24.0.0.
What's Changed