chengyouling commented on code in PR #4670:
URL:
https://github.com/apache/servicecomb-java-chassis/pull/4670#discussion_r1904068002
##########
service-registry/registry-service-center/src/main/java/org/apache/servicecomb/registry/sc/SCDiscoveryInstance.java:
##########
@@ -76,9 +76,13 @@ public String getVersion() {
@Override
public DataCenterInfo getDataCenterInfo() {
- return new
DataCenterInfo(microserviceInstance.getDataCenterInfo().getName(),
- microserviceInstance.getDataCenterInfo().getRegion(),
- microserviceInstance.getDataCenterInfo().getAvailableZone());
+ org.apache.servicecomb.service.center.client.model.DataCenterInfo
dataCenterInfo = microserviceInstance.getDataCenterInfo();
+ if (dataCenterInfo != null) {
Review Comment:
Maybe you can init DataCenterInfo when init MicroserviceInstance, so that
not need this modification.
--
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]