mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
Merge pull request #1536 from guerlab/master
[issue #1535 ]fix NacosServiceDiscovery.hostToServiceInstance method potential NullPointerException
This commit is contained in:
commit
93cb226850
@ -92,7 +92,9 @@ public class NacosServiceDiscovery {
|
||||
metadata.put("nacos.weight", instance.getWeight() + "");
|
||||
metadata.put("nacos.healthy", instance.isHealthy() + "");
|
||||
metadata.put("nacos.cluster", instance.getClusterName() + "");
|
||||
metadata.putAll(instance.getMetadata());
|
||||
if (instance.getMetadata() != null) {
|
||||
metadata.putAll(instance.getMetadata());
|
||||
}
|
||||
nacosServiceInstance.setMetadata(metadata);
|
||||
|
||||
if (metadata.containsKey("secure")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user