Jason918 commented on a change in pull request #12837:
URL: https://github.com/apache/pulsar/pull/12837#discussion_r750853678



##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/DefaultMessageFormatter.java
##########
@@ -81,21 +81,18 @@ private float _getFloatValue(float size) {
 
     private String getStringValue(float size) {
         int s = (int) size;
-        if (size == 0) {

Review comment:
       It seems that it's a default size for error situation.
   Maybe it's better not change it if you are absolute sure?

##########
File path: 
pulsar-testclient/src/main/java/org/apache/pulsar/testclient/DefaultMessageFormatter.java
##########
@@ -81,21 +81,18 @@ private float _getFloatValue(float size) {
 
     private String getStringValue(float size) {
         int s = (int) size;
-        if (size == 0) {
-            size = 20;
-        };
-        String result = "";
+        StringBuilder result = new StringBuilder();
         for(int i = 0; i < s; i++) {

Review comment:
       `org.apache.commons.lang3.RandomStringUtils#randomAlphabetic(int)` can 
be used to generate random string.




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