Skip to content

Commit

Permalink
remove flag!=null after decodeFromString
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Yiu authored and Tim Yiu committed Sep 22, 2023
1 parent a4cc3fa commit ea962e4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sdk/src/main/java/com/amplitude/experiment/FlagApi.kt
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ internal class SdkFlagApi(
(0 until jsonArray.length()).forEach {
val jsonString = jsonArray.getJSONObject(it).toString()
val flag = json.decodeFromString<EvaluationFlag>(jsonString)
if (flag != null) {
flags[flag.key] = flag
}
flags[flag.key] = flag
}

future.complete(flags)
Expand Down

0 comments on commit ea962e4

Please sign in to comment.