lhotari commented on code in PR #23577:
URL: https://github.com/apache/pulsar/pull/23577#discussion_r1855755815
##########
pulsar-client/src/main/java/org/apache/pulsar/client/util/NameUtil.java:
##########
@@ -21,7 +21,7 @@
import java.util.UUID;
import org.apache.commons.codec.digest.DigestUtils;
-public class ConsumerName {
+public class NameUtil {
public static String generateRandomName() {
return DigestUtils.sha1Hex(UUID.randomUUID().toString()).substring(0,
5);
}
Review Comment:
Now I see the reason of renaming the class,
https://github.com/apache/pulsar/pull/23577#discussion_r1846456815 .
I'd suggest removing this class completely in a follow up PR and using
Commons Lang3's `org.apache.commons.lang3.RandomStringUtils#randomAscii(int)`
method with the parameter `5` to create a random string of 5 characters.
@geniusjoe Would you like to submit a PR for that?
--
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]