renzhuyan commented on code in PR #3447:
URL: https://github.com/apache/incubator-shenyu/pull/3447#discussion_r886898426


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/manager/impl/SwaggerDocParser.java:
##########
@@ -56,7 +56,7 @@ public class SwaggerDocParser implements DocParser {
     @Override
     public DocInfo parseJson(final JSONObject docRoot) {
         final String basePath = docRoot.getString("basePath");
-        final String title = docRoot.getJSONObject("info").getString("title");
+        final String title = 
Optional.ofNullable(docRoot.getJSONObject("info")).map(jsonObject -> 
jsonObject.getString("title")).orElse("");

Review Comment:
   I will fix it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to