AlexStocks commented on code in PR #3256:
URL: https://github.com/apache/dubbo-go/pull/3256#discussion_r2969160683
##########
cluster/router/polaris/router.go:
##########
@@ -70,7 +95,9 @@ func newPolarisRouter(url *common.URL) (*polarisRouter,
error) {
if err := remotingpolaris.Check(); errors.Is(err,
remotingpolaris.ErrorNoOpenPolarisAbility) {
return &polarisRouter{
- openRoute: false,
+ openRoute: false,
Review Comment:
这里的类型断言 `registries.(map[string]*global.RegistryConfig)` 没有安全检查。如果
registries 是其他类型会 panic。建议使用 `registriesMap, ok :=
registries.(map[string]*global.RegistryConfig)` 并在 ok 为 false 时处理。
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]