You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "dragon-zhang (via GitHub)" <gi...@apache.org> on 2023/08/02 03:04:47 UTC

[GitHub] [shenyu] dragon-zhang commented on a diff in pull request #4944: Master polish

dragon-zhang commented on code in PR #4944:
URL: https://github.com/apache/shenyu/pull/4944#discussion_r1281329861


##########
shenyu-admin/src/main/java/org/apache/shenyu/admin/service/manager/impl/SwaggerDocParser.java:
##########
@@ -317,7 +317,7 @@ protected RefInfo getResponseRefInfo(final JsonObject docInfo) {
 
     private RefInfo getRefInfo(final JsonObject jsonObject) {
         JsonElement refElement;
-        boolean isArray = Objects.isNull(jsonObject.get("type")) ? false : "array".equals(jsonObject.get("type").getAsString());
+        boolean isArray = !Objects.isNull(jsonObject.get("type")) && "array".equals(jsonObject.get("type").getAsString());

Review Comment:
   maybe use `Objects.nonNull`.



-- 
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