mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-04-29 22:24:35 +02:00
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>
This commit is contained in:
parent
ebc5469fd0
commit
c7cb25c190
@ -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")
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user