http-client-branch: fix small mistake in CookieHeaderTest.java http-client-branch
authordfuchs
Thu, 29 Mar 2018 15:32:18 +0100
branchhttp-client-branch
changeset 56367 875d85699981
parent 56366 d50e3549506e
child 56368 c10279a27b41
http-client-branch: fix small mistake in CookieHeaderTest.java
test/jdk/java/net/httpclient/CookieHeaderTest.java
--- a/test/jdk/java/net/httpclient/CookieHeaderTest.java	Thu Mar 29 09:59:24 2018 +0100
+++ b/test/jdk/java/net/httpclient/CookieHeaderTest.java	Thu Mar 29 15:32:18 2018 +0100
@@ -174,9 +174,12 @@
                     cookies.stream()
                             .filter(s -> !s.startsWith("LOC"))
                             .collect(Collectors.toList()));
-            request = HttpRequest.newBuilder(uri)
-                    .header("X-uuid", "uuid-" + requestCounter.incrementAndGet())
-                    .build();
+            requestBuilder = HttpRequest.newBuilder(uri)
+                    .header("X-uuid", "uuid-" + requestCounter.incrementAndGet());
+            if (version != null) {
+                requestBuilder.version(version);
+            }
+            request = requestBuilder.build();
         }
     }