Skip to content

Commit

Permalink
Polishing contribution
Browse files Browse the repository at this point in the history
Closes gh-32799
  • Loading branch information
rstoyanchev committed May 15, 2024
1 parent 78549d4 commit 010e8a3
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -110,10 +110,11 @@ protected void applyHeaders() {
@Override
protected void applyCookies() {
MultiValueMap<String, HttpCookie> cookies = getCookies();
if (!cookies.isEmpty()) {
this.builder.header(HttpHeaders.COOKIE, cookies.values().stream()
.flatMap(List::stream).map(HttpCookie::toString).collect(Collectors.joining(";")));
if (cookies.isEmpty()) {
return;
}
this.builder.header(HttpHeaders.COOKIE, cookies.values().stream()
.flatMap(List::stream).map(HttpCookie::toString).collect(Collectors.joining(";")));
}

@Override
Expand Down

0 comments on commit 010e8a3

Please sign in to comment.