Copilot commented on code in PR #2942:
URL: https://github.com/apache/dubbo-go/pull/2942#discussion_r2188834892


##########
registry/directory/directory.go:
##########
@@ -575,14 +576,27 @@ type consumerConfigurationListener struct {
        directory *RegistryDirectory
 }
 
-func newConsumerConfigurationListener(dir *RegistryDirectory) 
*consumerConfigurationListener {
+func newConsumerConfigurationListener(dir *RegistryDirectory, url *common.URL) 
*consumerConfigurationListener {
        listener := &consumerConfigurationListener{directory: dir}
+
+       // TODO: Temporary compatibility with old APIs, can be removed later
        application := config.GetRootConfig().Application
        listener.InitWith(
                application.Name+constant.ConfiguratorSuffix,
                listener,
                extension.GetDefaultConfiguratorFunc(),
        )
+
+       if ApplicationConfRaw, ok := url.GetAttribute(constant.ApplicationKey); 
ok {

Review Comment:
   url.GetAttribute retrieves URL attributes, not params; since ApplicationKey 
is set via WithParamsValue, this branch will never execute. Consider using 
url.GetParam or url.SubURL.GetParam to fetch the ApplicationKey parameter.



-- 
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: notifications-unsubscr...@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to