This is an automated email from the ASF dual-hosted git repository.

wujimin pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/incubator-servicecomb-java-chassis.git


The following commit(s) were added to refs/heads/master by this push:
     new 45f7452  [SCB-646] if local swagger exists, not generate swagger 
according to class
45f7452 is described below

commit 45f74522fb7dce719ba09f493530212e4be17860
Author: weichao666 <[email protected]>
AuthorDate: Tue Jun 5 19:10:25 2018 +0800

    [SCB-646] if local swagger exists, not generate swagger according to class
---
 .../servicecomb/core/definition/schema/ProducerSchemaFactory.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
 
b/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
index 5f51eea..1334332 100644
--- 
a/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
+++ 
b/core/src/main/java/org/apache/servicecomb/core/definition/schema/ProducerSchemaFactory.java
@@ -107,8 +107,8 @@ public class ProducerSchemaFactory extends 
AbstractSchemaFactory<ProducerSchemaC
     }
 
     // 根据class动态产生契约
-    SwaggerGenerator generator = generateSwagger(context);
     if (swagger == null) {
+      SwaggerGenerator generator = generateSwagger(context);
       swagger = generator.getSwagger();
       String swaggerContent = getSwaggerContent(swagger);
       LOGGER.info("generate swagger for {}/{}/{}, swagger: {}",

-- 
To stop receiving notification emails like this one, please contact
[email protected].

Reply via email to