You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/06/01 01:11:10 UTC
[incubator-servicecomb-java-chassis] branch master updated:
[SCB-562] fix NPE when had empty interface (not have any method) (#729)
This is an automated email from the ASF dual-hosted git repository.
ningjiang 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 6dc769c [SCB-562] fix NPE when had empty interface (not have any method) (#729)
6dc769c is described below
commit 6dc769cd363568e20c77cea34e8f198acefec153
Author: zhengyangyong <ya...@huawei.com>
AuthorDate: Fri Jun 1 09:10:54 2018 +0800
[SCB-562] fix NPE when had empty interface (not have any method) (#729)
---
.../java/org/apache/servicecomb/core/definition/SchemaMeta.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
index 5652904..1a4e6f9 100644
--- a/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
+++ b/core/src/main/java/org/apache/servicecomb/core/definition/SchemaMeta.java
@@ -83,6 +83,12 @@ public class SchemaMeta extends CommonService<OperationMeta> {
}
private void initOperations() {
+ if (swagger.getPaths() == null) {
+ LOGGER.warn(swagger.getInfo().getTitle() + " with path " + swagger.getBasePath()
+ + " is an empty interface, please delete it or fill with one method!");
+ return;
+ }
+
for (Entry<String, Path> entry : swagger.getPaths().entrySet()) {
String strPath = entry.getKey();
Path path = entry.getValue();
--
To stop receiving notification emails like this one, please contact
ningjiang@apache.org.