Closed hust-twj closed 2 months ago
原因: 在 KSP 生成的类中,走到了autowiredInject方法的 for 循环中,第一次使用 DefaultUrlParser 解析是正确的:
但是在下一次循环中,又通过 DefaultServiceParser 解析,返回了一个非空的、但是值都是默认值的 实体:
第二次会覆盖第一次,最终导致获取不到我传过来的参数。
解决: autowiredInject() 方法中获取到值后是不是可以直接退出循环?
不用 @Autowired,用 intent.extra.getParcelable() 的方式能正常获取。
复现路径: fork 了个工程来复现:https://github.com/hust-twj/hll-wp-therouter-android local.proterty 如下:
app=true agp=true business-a=true business-b=true business-base=true plugin=true router=true
Parcelable 是通过 插件生成的:apply plugin: 'kotlin-parcelize'
1.2.3-rc1 已解决 https://github.com/HuolalaTech/hll-wp-therouter-android/releases/tag/v1.2.3-rc1
1.2.3-rc1
原因: 在 KSP 生成的类中,走到了autowiredInject方法的 for 循环中,第一次使用 DefaultUrlParser 解析是正确的:
但是在下一次循环中,又通过 DefaultServiceParser 解析,返回了一个非空的、但是值都是默认值的 实体:
第二次会覆盖第一次,最终导致获取不到我传过来的参数。
解决: autowiredInject() 方法中获取到值后是不是可以直接退出循环?
不用 @Autowired,用 intent.extra.getParcelable() 的方式能正常获取。
复现路径: fork 了个工程来复现:https://github.com/hust-twj/hll-wp-therouter-android local.proterty 如下:
Parcelable 是通过 插件生成的:apply plugin: 'kotlin-parcelize'