Skip to content

NullPointerException when passing null as the fallback value of jsonVariation #97

@justinJobox

Description

@justinJobox

Describe the bug
Upgraded LaunchDarkly to 2.10.0 from an older version, once the app is updated from Google Play store, the app will crash 1-2 times due to this line:
LDClient.jsonVariation(FLAG_KEY, null)

Logs
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Object.equals(java.lang.Object)' on a null object reference at com.launchdarkly.android.UserSummaryEventSharedPreferences.addOrUpdateEvent(UserSummaryEventSharedPreferences.java:49) at com.launchdarkly.android.LDClient.updateSummaryEvents(LDClient.java:630) at com.launchdarkly.android.LDClient.variationDetailInternal(LDClient.java:394) at com.launchdarkly.android.LDClient.jsonVariation(LDClient.java:353)

SDK version
Android sdk 2.10.0

Language version, developer tools
Kotlin, Android Studio

OS/platform
Android

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions