fix: fallback to patch class name instead of java.lang.Class class name

This commit is contained in:
oSumAtrIX 2022-11-18 02:14:20 +01:00
parent 18fe35ae73
commit 4164cb0dea
No known key found for this signature in database
GPG Key ID: A9B3094ACDB604B4

View File

@ -41,7 +41,7 @@ private fun <T : Annotation> Class<*>.findAnnotationRecursively(
object PatchExtensions {
val Class<out Patch<Context>>.patchName: String
get() = findAnnotationRecursively(Name::class)?.name ?: this.javaClass.simpleName
get() = findAnnotationRecursively(Name::class)?.name ?: this.simpleName
val Class<out Patch<Context>>.version
get() = findAnnotationRecursively(Version::class)?.version