[ 
https://issues.apache.org/jira/browse/SCB-1047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16708349#comment-16708349
 ] 

ASF GitHub Bot commented on SCB-1047:
-------------------------------------

heyile commented on a change in pull request #1013: [SCB-1047]microservice.yaml 
 service_description.version support form…
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1013#discussion_r238559568
 
 

 ##########
 File path: 
service-registry/src/main/java/org/apache/servicecomb/serviceregistry/api/registry/MicroserviceFactory.java
 ##########
 @@ -53,8 +54,13 @@ private Microservice 
createMicroserviceFromDefinition(Configuration configuratio
     
microservice.setServiceName(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_NAME_KEY,
         DEFAULT_MICROSERVICE_NAME));
     microservice.setAppId(configuration.getString(CONFIG_APPLICATION_ID_KEY, 
DEFAULT_APPLICATION_ID));
-    
microservice.setVersion(configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_VERSION_KEY,
-        DEFAULT_MICROSERVICE_VERSION));
+    String version = 
configuration.getString(CONFIG_QUALIFIED_MICROSERVICE_VERSION_KEY,
+        DEFAULT_MICROSERVICE_VERSION);
+    //check version format
+    if (!Version.checkVersion(version)) {
 
 Review comment:
   Maybe just check format is better ? the new Version instance will never be 
used 

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


> microservice.yaml  service_description.version support format xxx.xx.xxx.xxx
> ----------------------------------------------------------------------------
>
>                 Key: SCB-1047
>                 URL: https://issues.apache.org/jira/browse/SCB-1047
>             Project: Apache ServiceComb
>          Issue Type: Improvement
>          Components: Java-Chassis
>            Reporter: 何一乐
>            Assignee: 何一乐
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to