commit c7cb25c19022f3cad69a5add6d7845cab6b77fd5
parent ebc5469fd0a42cd49dadc0ca2621bf58f1ed84c9
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Wed,  8 Jan 2025 22:52:02 +0100

fix(core/wrapper): param map field
In versions higher than 13.22.0.61, the paramMap field is no longer typed as a ConcurrentHashMap

Signed-off-by: rhunk <101876869+rhunk@users.noreply.github.com>

Diffstat:
Mcore/src/main/kotlin/me/rhunk/snapenhance/core/wrapper/impl/media/opera/ParamMap.kt | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/core/wrapper/impl/media/opera/ParamMap.kt b/core/src/main/kotlin/me/rhunk/snapenhance/core/wrapper/impl/media/opera/ParamMap.kt @@ -10,7 +10,7 @@ import java.util.concurrent.ConcurrentHashMap class ParamMap(obj: Any?) : AbstractWrapper(obj) { private val paramMapField: Field by lazy { instanceNonNull()::class.java.findFields(once = true) { - it.type == ConcurrentHashMap::class.java + it.type == ConcurrentHashMap::class.java || runCatching { it.get(instance) }.getOrNull() is ConcurrentHashMap<*, *> }.firstOrNull() ?: throw RuntimeException("Could not find paramMap field") }