You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/11/23 14:39:25 UTC

[GitHub] [pulsar] Shoothzj commented on a change in pull request #12837: Remove unused assign value in DefaultMessageFormatter

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



##########
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:
       Optimized




-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org