-
Notifications
You must be signed in to change notification settings - Fork 991
Open
Description
期望结果
如题,不知道是否正常。
背景
Line 54 in c851906
public boolean onInterceptCallNative(@NonNull String componentName, |
这里虽然有标注 @NonNull
,但在 Dev 模式下 reload 后, componentName
变为 null
这会导致开发者在写 kt 的时候没有处理 null
的情况,从而导致 NPE,如下
override fun onInterceptCallNative(p0: String, p1: HippyCallNativeParams): Boolean {
return false
}
目前改为这样以规避问题,但理论上不该出现 componentName
为 null
的情况
override fun onInterceptCallNative(p0: String?, p1: HippyCallNativeParams): Boolean {
return false
}
实际结果
理论上不该出现 componentName
为 null
的情况
重现链接
No response
重现步骤
- 用 kt 实现
HippyEngineMonitorAdapter
并标注onInterceptCallNative
的第一个参数类型为String
- 指定该 Adapter 为
engineMonitor
- 进入 Dev 模式
- 通过屏幕左上方悬浮点进行 reload
- 预期将会看到 Hippy 黑屏
重现环境
No response
补充说明
如需更多信息,企微联系 routersitu
Metadata
Metadata
Assignees
Labels
No labels