You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by GitBox <gi...@apache.org> on 2022/06/01 14:47:26 UTC

[GitHub] [incubator-shenyu] renzhuyan commented on a diff in pull request #3447: NPE repair of admin module caused by spring MVC example synchronization

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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org