jdk/src/java.base/share/classes/java/util/Locale.java
changeset 26219 1a19360ff122
parent 25859 3317bb8137f4
child 28059 e576535359cc
--- a/jdk/src/java.base/share/classes/java/util/Locale.java	Wed Aug 27 11:33:45 2014 +0800
+++ b/jdk/src/java.base/share/classes/java/util/Locale.java	Wed Aug 27 22:08:19 2014 +0400
@@ -2059,14 +2059,11 @@
         // If we have no list patterns, compose the list in a simple,
         // non-localized way.
         if (listPattern == null || listCompositionPattern == null) {
-            StringBuilder result = new StringBuilder();
+            StringJoiner sj = new StringJoiner(",");
             for (int i = 0; i < stringList.length; ++i) {
-                if (i > 0) {
-                    result.append(',');
-                }
-                result.append(stringList[i]);
+                sj.add(stringList[i]);
             }
-            return result.toString();
+            return sj.toString();
         }
 
         // Compose the list down to three elements if necessary