From ea962e48450ff2a6058a9cc225626989f7d40af4 Mon Sep 17 00:00:00 2001 From: Tim Yiu Date: Fri, 22 Sep 2023 14:31:03 -0700 Subject: [PATCH] remove flag!=null after decodeFromString --- sdk/src/main/java/com/amplitude/experiment/FlagApi.kt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sdk/src/main/java/com/amplitude/experiment/FlagApi.kt b/sdk/src/main/java/com/amplitude/experiment/FlagApi.kt index 64e2552..46c7a9f 100644 --- a/sdk/src/main/java/com/amplitude/experiment/FlagApi.kt +++ b/sdk/src/main/java/com/amplitude/experiment/FlagApi.kt @@ -59,9 +59,7 @@ internal class SdkFlagApi( (0 until jsonArray.length()).forEach { val jsonString = jsonArray.getJSONObject(it).toString() val flag = json.decodeFromString(jsonString) - if (flag != null) { - flags[flag.key] = flag - } + flags[flag.key] = flag } future.complete(flags)