strongduanmu commented on code in PR #29279:
URL: https://github.com/apache/shardingsphere/pull/29279#discussion_r1421371494


##########
infra/database/core/src/main/java/org/apache/shardingsphere/infra/database/core/metadata/database/enums/QuoteCharacter.java:
##########
@@ -56,7 +69,7 @@ public static QuoteCharacter getQuoteCharacter(final String 
value) {
         if (Strings.isNullOrEmpty(value)) {
             return NONE;
         }
-        return Arrays.stream(values()).filter(each -> NONE != each && 
each.startDelimiter.charAt(0) == value.charAt(0)).findFirst().orElse(NONE);
+        return 
Optional.ofNullable(BY_FIRST_CHAR.get(value.charAt(0))).orElse(NONE);

Review Comment:
   Can you use getOrDefault method here?



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