Skip to content

fix(core.runtime):修复容器 authority 和插件 authority 相同时返回错误 Uri 的问题#1429

Open
yanglw wants to merge 1 commit intoTencent:masterfrom
yanglw:master
Open

fix(core.runtime):修复容器 authority 和插件 authority 相同时返回错误 Uri 的问题#1429
yanglw wants to merge 1 commit intoTencent:masterfrom
yanglw:master

Conversation

@yanglw
Copy link
Contributor

@yanglw yanglw commented Mar 21, 2026

当容器 authority 和插件 authority 相同,通过 uriString.replace 转换 Uri 时,会将宿主和插件的 authority 都进行删除,导致返回的 Uri 错误,无法匹配真正的插件 Content Provider 。

@tencent-adm
Copy link
Member

CLA assistant check
Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@shifujun
Copy link
Collaborator

这个代码时间久了点,我印象不太准了。这里的容器authority不是shadow框架写的固定的吗?或者是宿主中注册的固定的吧?是不是应该会固定成容器含义的字符串,为什么插件的authority会跟容器的相同呢?

@yanglw
Copy link
Contributor Author

yanglw commented Mar 21, 2026 via email

@shifujun
Copy link
Collaborator

建议修改2点:

  1. 提交记录标题的fix(core.runtime)改为fix(core.loader)
  2. 能否仿照projects/sdk/core/loader/src/test/kotlin/com/tencent/shadow/core/loader/classloaders/PluginClassLoaderTest.kt 给这个convert2PluginUri方法写一个单元测试?这个正则表达式还是很难用人眼看出问题的。

@yanglw
Copy link
Contributor Author

yanglw commented Mar 21, 2026 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants