CrazyHZM commented on a change in pull request #9691:
URL: https://github.com/apache/dubbo/pull/9691#discussion_r814440571



##########
File path: 
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
##########
@@ -457,6 +457,7 @@ private void doExportUrlsFor1Protocol(ProtocolConfig 
protocolConfig, List<URL> r
             }
         }
         //init serviceMetadata attachments
+        serviceMetadata.getAttachments().forEach((k, v) -> map.put(k, 
String.valueOf(v)));

Review comment:
       The same as above.
   

##########
File path: 
dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java
##########
@@ -308,6 +308,7 @@ public synchronized void init() {
         }
         map.put(REGISTER_IP_KEY, hostToRegistry);
 
+        serviceMetadata.getAttachments().forEach((k, v) -> map.put(k, 
String.valueOf(v)));

Review comment:
       When the value is not of type String, an exception will be thrown, and 
it is necessary to ensure that only metadata of type String can be passed




-- 
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]

Reply via email to