Skip to content

Commit

Permalink
Refactor code to use functional style
Browse files Browse the repository at this point in the history
  • Loading branch information
Mansi-mParticle committed Nov 22, 2024
1 parent 3f8f3fd commit dfe6efc
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,5 @@ open class BaseMPMessageBuilder(messageType: String) : JSONObject() {
}

val keys: Array<String?>
get() {
val strings: MutableList<String?> = ArrayList<String?>()
val iterator = keys()
while (iterator.hasNext()) {
strings.add(iterator.next())
}
return strings.toTypedArray<String?>()
}
get() = keys().asSequence().toList().toTypedArray()
}

0 comments on commit dfe6efc

Please sign in to comment.