Skip to content
Snippets Groups Projects
Unverified Commit e4e3abb5 authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

feat: massively simplify crash reporter

parent ca17307d
Branches
Tags
No related merge requests found
Pipeline #3019 failed
......@@ -19,6 +19,9 @@
package de.kuschku.malheur.data
import kotlinx.serialization.Serializable
@Serializable
data class TraceElement(
val className: String?,
val methodName: String?,
......
......@@ -19,17 +19,6 @@
package de.kuschku.malheur.util
fun reflectionCollectConstants(klass: Class<*>?) = klass?.declaredFields
?.mapNotNull {
var result: Pair<String, Any?>? = null
try {
result = it.name to it.get(null)
} catch (e: IllegalAccessException) {
} catch (e: IllegalArgumentException) {
}
result
}?.toMap()
fun <T> reflectionCollectGetters(klass: Class<T>?) = klass?.declaredMethods
?.filter { it.parameterTypes.isEmpty() && it.returnType != Void::class.java }
?.filter { it.name != "getClass" }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment