tang7526 commented on a change in pull request #10012: URL: https://github.com/apache/kafka/pull/10012#discussion_r572543598
########## File path: clients/src/main/java/org/apache/kafka/common/utils/Utils.java ########## @@ -1334,4 +1334,13 @@ public static long getDateTime(String timestamp) throws ParseException, IllegalA public static <S> Iterator<S> covariantCast(Iterator<? extends S> iterator) { return (Iterator<S>) iterator; } + + /** + * Checks if a string is null, empty or whitespace only. + * @param str a string to be checked + * @return true if the string is null, empty or whitespace only; otherwise, return false. + */ + public static boolean isBlank(String str) { Review comment: > How about applying this helper method to code base? @chia7712 OK. I will do it on next PR. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org