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/26 06:47:52 UTC

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

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


##########
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:
   agree



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