dubbo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] beiwei30 commented on a change in pull request #1388: Remove unnecessary StringBuilder
Date Sun, 08 Apr 2018 02:23:41 GMT
beiwei30 commented on a change in pull request #1388: Remove unnecessary StringBuilder
URL: https://github.com/apache/incubator-dubbo/pull/1388#discussion_r179933003
 
 

 ##########
 File path: dubbo-cluster/src/main/java/com/alibaba/dubbo/rpc/cluster/merger/ArrayMerger.java
 ##########
 @@ -34,9 +34,7 @@
             if (item != null && item.getClass().isArray()) {
                 totalLen += Array.getLength(item);
             } else {
-                throw new IllegalArgumentException(
-                        new StringBuilder(32).append(i + 1)
-                                .append("th argument is not an array").toString());
+                throw new IllegalArgumentException(i + 1 + "th argument is not an array");
 
 Review comment:
   agree. I will accept the change, but will submit a supplementary change because it's safer
by doing this.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message