You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/03/21 03:42:40 UTC

[GitHub] [dubbo] chickenlj commented on a change in pull request #9807: fix dubbo.metadata-report.protocol cannot be applied

chickenlj commented on a change in pull request #9807:
URL: https://github.com/apache/dubbo/pull/9807#discussion_r830737032



##########
File path: dubbo-metadata/dubbo-metadata-api/src/main/java/org/apache/dubbo/metadata/report/MetadataReportInstance.java
##########
@@ -82,7 +81,7 @@ public void init(List<MetadataReportConfig> metadataReportConfigs) {
     private void init(MetadataReportConfig config, MetadataReportFactory metadataReportFactory) {
         URL url = config.toUrl();
         if (METADATA_REPORT_KEY.equals(url.getProtocol())) {
-            String protocol = url.getParameter(METADATA_REPORT_KEY, DEFAULT_DIRECTORY);
+            String protocol = url.getParameter(METADATA_REPORT_KEY, config.getProtocol());

Review comment:
       `url.getParameter(METADATA_REPORT_KEY, isEmpty(config.getProtocol()) ? dubbo :config.getProtocol() );`
   
   I think we need to check if `config.getProtocol()` is empty here.
   
   




-- 
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-unsubscribe@dubbo.apache.org

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



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