Skip to content

Commit bab5068

Browse files
HdSharefankes
andauthored
fix: check origin return value is an issue with type Any (#111)
* fix: check origin return value is an issue with type Any * refactor: replace to modern usage --------- Co-authored-by: fankesyooni <[email protected]>
1 parent e1544a8 commit bab5068

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

yukihookapi-core/src/main/java/com/highcapable/yukihookapi/hook/core/YukiMemberHookCreator.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626

2727
package com.highcapable.yukihookapi.hook.core
2828

29+
import com.highcapable.kavaref.extension.classOf
2930
import com.highcapable.kavaref.extension.isNotSubclassOf
3031
import com.highcapable.yukihookapi.YukiHookAPI
3132
import com.highcapable.yukihookapi.hook.bean.HookClass
@@ -545,6 +546,7 @@ class YukiMemberHookCreator internal constructor(private val packageParam: Packa
545546
*/
546547
private fun checkingReturnType(origin: Class<*>?, target: Class<*>?) {
547548
if (origin == null || target == null) return
549+
if (origin == classOf<Any>()) return
548550
origin.toJavaPrimitiveType().also { o ->
549551
target.toJavaPrimitiveType().also { t ->
550552
if (o isNotSubclassOf t && t isNotSubclassOf o)
@@ -843,7 +845,7 @@ class YukiMemberHookCreator internal constructor(private val packageParam: Packa
843845
* 监听 [members] 重复 Hook 的回调方法
844846
*
845847
* - 此方法及功能已被移除 - 在之后的版本中将直接被删除
846-
*
848+
*
847849
* - 不再限制重复 Hook 操作
848850
* @return [Result] 可继续向下监听
849851
*/

0 commit comments

Comments
 (0)