You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2022/05/25 09:26:18 UTC

[GitHub] [servicecomb-java-chassis] Shoothzj commented on a diff in pull request #3004: [SCB-2532] simplify if statement of SwaggerToProtoGenerator

Shoothzj commented on code in PR #3004:
URL: https://github.com/apache/servicecomb-java-chassis/pull/3004#discussion_r881431807


##########
common/common-protobuf/src/main/java/org/apache/servicecomb/codec/protobuf/internal/converter/SwaggerToProtoGenerator.java:
##########
@@ -101,10 +101,7 @@ public static String escapeMessageName(String name) {
   }
 
   public static boolean isValidEnum(String name) {
-    if (name.contains(".") || name.contains("-")) {
-      return false;
-    }
-    return true;
+    return !name.contains(".") && !name.contains("-");

Review Comment:
   the older seems more easily to read.



-- 
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: commits-unsubscribe@servicecomb.apache.org

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