8290300: Use standard String-joining tools where applicable

Reviewed-by: naoto, rriggs, dfuchs
This commit is contained in:
Sergey Tsypanov 2022-08-21 17:22:10 +00:00 committed by Claes Redestad
parent f9004fe443
commit 9a65524e2f
4 changed files with 6 additions and 18 deletions

View file

@ -1536,11 +1536,7 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
}
List<String> l = entry.getValue();
if (l != null && !l.isEmpty()) {
StringJoiner cookieValue = new StringJoiner("; ");
for (String value : l) {
cookieValue.add(value);
}
requests.add(key, cookieValue.toString());
requests.add(key, String.join("; ", l));
}
}
}