mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8290300: Use standard String-joining tools where applicable
Reviewed-by: naoto, rriggs, dfuchs
This commit is contained in:
parent
f9004fe443
commit
9a65524e2f
4 changed files with 6 additions and 18 deletions
|
@ -48,7 +48,6 @@ import java.io.Serializable;
|
|||
import java.text.MessageFormat;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.spi.LocaleNameProvider;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import jdk.internal.vm.annotation.Stable;
|
||||
|
||||
|
@ -2335,7 +2334,7 @@ public final class Locale implements Cloneable, Serializable {
|
|||
// If we have no list patterns, compose the list in a simple,
|
||||
// non-localized way.
|
||||
if (pattern == null) {
|
||||
return Arrays.stream(stringList).collect(Collectors.joining(","));
|
||||
return String.join(",", stringList);
|
||||
}
|
||||
|
||||
return switch (stringList.length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue