[
https://issues.apache.org/jira/browse/SCB-595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16497714#comment-16497714
]
ASF GitHub Bot commented on SCB-595:
------------------------------------
laijianbin commented on a change in pull request #740: [SCB-595]Compatible with
old SC
URL:
https://github.com/apache/incubator-servicecomb-java-chassis/pull/740#discussion_r192328333
##########
File path:
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/registry/AbstractServiceRegistry.java
##########
@@ -184,6 +184,16 @@ private void loadFrameworkVersions() {
framework.setVersion(FrameworkVersions.allVersions());
microservice.setFramework(framework);
microservice.setRegisterBy(CONFIG_DEFAULT_REGISTER_BY);
+ ServiceCenterInfo info = srClient.getServiceCenterInfo();
+ while (info == null) {
+ return;
+ }
+ String serviceCenterVersion = info.getVersion();
+ String validateSuccessVersion = "1.0.0";
+ int compareResult =
serviceCenterVersion.compareTo(validateSuccessVersion);// 如果大于1.0.0,不需要兼容
+ if (compareResult < 1) {
+ microservice.getFramework().setVersion(null);
Review comment:
@liubao68 The difference is not matter you use old SC or latest SC the
version is still not changed when use the code that last PR we have removed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Compatible with old SC versions
> -------------------------------
>
> Key: SCB-595
> URL: https://issues.apache.org/jira/browse/SCB-595
> Project: Apache ServiceComb
> Issue Type: Task
> Reporter: laijianbin
> Assignee: laijianbin
> Priority: Major
> Fix For: java-chassis-1.0.0-m2
>
>
> As Framework version use json style like xxx:xxx,but old Service
> Center(eg:2.2.49) is not Compatible
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)