hachikuji commented on a change in pull request #9967: URL: https://github.com/apache/kafka/pull/9967#discussion_r567309420
########## File path: clients/src/main/java/org/apache/kafka/common/Uuid.java ########## @@ -106,6 +106,9 @@ public String toString() { */ public static Uuid fromString(String str) { ByteBuffer uuidBytes = ByteBuffer.wrap(Base64.getUrlDecoder().decode(str)); + if (uuidBytes.remaining() != 16) { + throw new IllegalArgumentException("Failed to parse `" + str + "` as a base64-encoded UUID"); Review comment: Thanks. Tried to improve this in the latest commit. Please take a look. ---------------------------------------------------------------- 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