mirror of
https://github.com/mamoe/mirai.git
synced 2025-03-25 06:50:09 +08:00
Ignore null values
This commit is contained in:
parent
9faea0a396
commit
f57d0242ad
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user