Skip to content

Commit 7750a87

Browse files
authored
Remove null values before concatenation (#515)
1 parent 0411092 commit 7750a87

File tree

1 file changed

+4
-1
lines changed
  • AndroidSDKCore/src/main/java/com/leanplum/migration/wrapper

1 file changed

+4
-1
lines changed

AndroidSDKCore/src/main/java/com/leanplum/migration/wrapper/CTWrapper.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ internal class CTWrapper(
217217

218218
private fun mapNotSupportedValues(entry: Map.Entry<String, Any?>): Any? {
219219
return when (val value = entry.value) {
220-
is Iterable<*> -> value.joinToString(separator = ",", prefix = "[", postfix = "]")
220+
is Iterable<*> ->
221+
value
222+
.filterNotNull()
223+
.joinToString(separator = ",", prefix = "[", postfix = "]")
221224
is Byte -> value.toInt()
222225
is Short -> value.toInt()
223226
else -> value

0 commit comments

Comments
 (0)