WillemJiang commented on a change in pull request #729: [SCB-562] fix NPE when 
had empty interface (not have any method)
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/729#discussion_r191129310
 
 

 ##########
 File path: 
core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
 ##########
 @@ -83,40 +83,42 @@ public String getPackageName() {
   }
 
   private void initOperations() {
-    for (Entry<String, Path> entry : swagger.getPaths().entrySet()) {
-      String strPath = entry.getKey();
-      Path path = entry.getValue();
-      for (Entry<HttpMethod, Operation> operationEntry : 
path.getOperationMap().entrySet()) {
-        Operation operation = operationEntry.getValue();
-        if (operation.getOperationId() == null) {
-          throw ExceptionUtils.operationIdInvalid(getSchemaId(), strPath);
+    if (swagger.getPaths() != null) {
 
 Review comment:
   I think we to write a logger for it, so use can know what's wrong here.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to