Commit f57d0242 authored by Him188's avatar Him188

Ignore null values

parent 9faea0a3
......@@ -135,7 +135,7 @@ private fun Any.contentToStringReflectively(prefix: String, filter: ((name: Stri
.distinctBy { it.name }
.filterNot { it.name.contains("$") || it.name == "Companion" || it.isConst || it.name == "serialVersionUID" }
.mapNotNull {
val value = it.getValueAgainstPermission(this)
val value = it.getValueAgainstPermission(this) ?: return@mapNotNull null
if (filter != null) {
if (!filter(it.name, value))
return@mapNotNull it.name to value
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment