Skip to content

Commit 010e8a3

Browse files
committed
Polishing contribution
Closes gh-32799
1 parent 78549d4 commit 010e8a3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spring-web/src/main/java/org/springframework/http/client/reactive/JdkClientHttpRequest.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2024 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -110,10 +110,11 @@ protected void applyHeaders() {
110110
@Override
111111
protected void applyCookies() {
112112
MultiValueMap<String, HttpCookie> cookies = getCookies();
113-
if (!cookies.isEmpty()) {
114-
this.builder.header(HttpHeaders.COOKIE, cookies.values().stream()
115-
.flatMap(List::stream).map(HttpCookie::toString).collect(Collectors.joining(";")));
113+
if (cookies.isEmpty()) {
114+
return;
116115
}
116+
this.builder.header(HttpHeaders.COOKIE, cookies.values().stream()
117+
.flatMap(List::stream).map(HttpCookie::toString).collect(Collectors.joining(";")));
117118
}
118119

119120
@Override

0 commit comments

Comments
 (0)