From d4563985b38cd913488753f47a79808754a5588b Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Mon, 7 Feb 2022 15:27:14 +0000 Subject: [PATCH 1/5] 8281324: Bump update version for OpenJDK: jdk-11.0.14.1 Reviewed-by: sgehwolf, clanger --- .jcheck/conf | 2 +- make/autoconf/version-numbers | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.jcheck/conf b/.jcheck/conf index 3fb2dfb31fa..46f4682b4fe 100644 --- a/.jcheck/conf +++ b/.jcheck/conf @@ -1,7 +1,7 @@ [general] project=jdk-updates jbs=JDK -version=11.0.14 +version=11.0.14.1 [checks] error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace diff --git a/make/autoconf/version-numbers b/make/autoconf/version-numbers index f8945e435aa..2773808a58f 100644 --- a/make/autoconf/version-numbers +++ b/make/autoconf/version-numbers @@ -29,11 +29,11 @@ DEFAULT_VERSION_FEATURE=11 DEFAULT_VERSION_INTERIM=0 DEFAULT_VERSION_UPDATE=14 -DEFAULT_VERSION_PATCH=0 +DEFAULT_VERSION_PATCH=1 DEFAULT_VERSION_EXTRA1=0 DEFAULT_VERSION_EXTRA2=0 DEFAULT_VERSION_EXTRA3=0 -DEFAULT_VERSION_DATE=2022-01-18 +DEFAULT_VERSION_DATE=2022-02-08 DEFAULT_VERSION_CLASSFILE_MAJOR=55 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`" DEFAULT_VERSION_CLASSFILE_MINOR=0 DEFAULT_ACCEPTABLE_BOOT_VERSIONS="10 11" From 4dcd31c1b660c5b9b45ded577eb8cb493434b5f1 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Mon, 7 Feb 2022 16:15:44 +0000 Subject: [PATCH 2/5] 8218546: Unable to connect to https://google.com using java.net.HttpClient Reviewed-by: clanger Backport-of: b240c60427e693c4e8afc34fc52b2f9f70584537 --- .../classes/jdk/internal/net/http/Stream.java | 4 - .../net/httpclient/SpecialHeadersTest.java | 87 ++++++++++++++----- 2 files changed, 63 insertions(+), 28 deletions(-) diff --git a/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java b/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java index 61f7ca3689b..fb4a4dab173 100644 --- a/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java @@ -614,10 +614,6 @@ private OutgoingHeaders> headerFrame(long contentLength) { if (contentLength > 0) { h.setHeader("content-length", Long.toString(contentLength)); } - URI uri = request.uri(); - if (uri != null) { - h.setHeader("host", Utils.hostString(request)); - } HttpHeaders sysh = filterHeaders(h.build()); HttpHeaders userh = filterHeaders(request.getUserHeaders()); // Filter context restricted from userHeaders diff --git a/test/jdk/java/net/httpclient/SpecialHeadersTest.java b/test/jdk/java/net/httpclient/SpecialHeadersTest.java index fa515a123a9..648683cd88a 100644 --- a/test/jdk/java/net/httpclient/SpecialHeadersTest.java +++ b/test/jdk/java/net/httpclient/SpecialHeadersTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -25,7 +25,7 @@ * @test * @summary Verify that some special headers - such as User-Agent * can be specified by the caller. - * @bug 8203771 + * @bug 8203771 8218546 * @modules java.base/sun.net.www.http * java.net.http/jdk.internal.net.http.common * java.net.http/jdk.internal.net.http.frame @@ -64,8 +64,6 @@ import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.net.http.HttpResponse.BodyHandlers; -import java.security.AccessController; -import java.security.PrivilegedAction; import java.time.Duration; import java.util.ArrayList; import java.util.Arrays; @@ -74,13 +72,13 @@ import java.util.Map; import java.util.Optional; import java.util.function.Function; - -import static java.lang.System.err; import static java.lang.System.out; import static java.net.http.HttpClient.Builder.NO_PROXY; +import static java.net.http.HttpClient.Version.HTTP_2; import static java.nio.charset.StandardCharsets.US_ASCII; import org.testng.Assert; import static org.testng.Assert.assertEquals; +import static org.testng.Assert.assertTrue; public class SpecialHeadersTest implements HttpServerAdapters { @@ -151,7 +149,11 @@ static String userAgent() { "USER-AGENT", u -> userAgent(), "HOST", u -> u.getRawAuthority()); @Test(dataProvider = "variants") - void test(String uriString, String headerNameAndValue, boolean sameClient) throws Exception { + void test(String uriString, + String headerNameAndValue, + boolean sameClient) + throws Exception + { out.println("\n--- Starting "); int index = headerNameAndValue.indexOf(":"); @@ -183,21 +185,41 @@ void test(String uriString, String headerNameAndValue, boolean sameClient) throw assertEquals(resp.statusCode(), 200, "Expected 200, got:" + resp.statusCode()); - String receivedHeaderString = value == null ? null - : resp.headers().firstValue("X-"+key).get(); - out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); - if (value != null) { - assertEquals(receivedHeaderString, value); - assertEquals(resp.headers().allValues("X-"+key), List.of(value)); + boolean isInitialRequest = i == 0; + boolean isSecure = uri.getScheme().equalsIgnoreCase("https"); + boolean isHTTP2 = resp.version() == HTTP_2; + boolean isNotH2CUpgrade = isSecure || (sameClient == true && !isInitialRequest); + boolean isDefaultHostHeader = name.equalsIgnoreCase("host") && useDefault; + + // By default, HTTP/2 sets the `:authority:` pseudo-header, instead + // of the `Host` header. Therefore, there should be no "X-Host" + // header in the response, except the response to the h2c Upgrade + // request which will have been sent through HTTP/1.1. + + if (isDefaultHostHeader && isHTTP2 && isNotH2CUpgrade) { + assertTrue(resp.headers().firstValue("X-" + key).isEmpty()); + assertTrue(resp.headers().allValues("X-" + key).isEmpty()); + out.println("No X-" + key + " header received, as expected"); } else { - assertEquals(resp.headers().allValues("X-"+key).size(), 0); + String receivedHeaderString = value == null ? null + : resp.headers().firstValue("X-"+key).get(); + out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); + if (value != null) { + assertEquals(receivedHeaderString, value); + assertEquals(resp.headers().allValues("X-"+key), List.of(value)); + } else { + assertEquals(resp.headers().allValues("X-"+key).size(), 0); + } } - } } @Test(dataProvider = "variants") - void testHomeMadeIllegalHeader(String uriString, String headerNameAndValue, boolean sameClient) throws Exception { + void testHomeMadeIllegalHeader(String uriString, + String headerNameAndValue, + boolean sameClient) + throws Exception + { out.println("\n--- Starting "); final URI uri = URI.create(uriString); @@ -266,6 +288,11 @@ void testAsync(String uriString, String headerNameAndValue, boolean sameClient) } HttpRequest request = requestBuilder.build(); + boolean isInitialRequest = i == 0; + boolean isSecure = uri.getScheme().equalsIgnoreCase("https"); + boolean isNotH2CUpgrade = isSecure || (sameClient == true && !isInitialRequest); + boolean isDefaultHostHeader = name.equalsIgnoreCase("host") && useDefault; + client.sendAsync(request, BodyHandlers.ofString()) .thenApply(response -> { out.println("Got response: " + response); @@ -273,15 +300,27 @@ void testAsync(String uriString, String headerNameAndValue, boolean sameClient) assertEquals(response.statusCode(), 200); return response;}) .thenAccept(resp -> { - String receivedHeaderString = value == null ? null - : resp.headers().firstValue("X-"+key).get(); - out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); - if (value != null) { - assertEquals(receivedHeaderString, value); - assertEquals(resp.headers().allValues("X-" + key), List.of(value)); + // By default, HTTP/2 sets the `:authority:` pseudo-header, instead + // of the `Host` header. Therefore, there should be no "X-Host" + // header in the response, except the response to the h2c Upgrade + // request which will have been sent through HTTP/1.1. + + if (isDefaultHostHeader && resp.version() == HTTP_2 && isNotH2CUpgrade) { + assertTrue(resp.headers().firstValue("X-" + key).isEmpty()); + assertTrue(resp.headers().allValues("X-" + key).isEmpty()); + out.println("No X-" + key + " header received, as expected"); } else { - assertEquals(resp.headers().allValues("X-" + key).size(), 1); - } }) + String receivedHeaderString = value == null ? null + : resp.headers().firstValue("X-"+key).get(); + out.println("Got X-" + key + ": " + resp.headers().allValues("X-"+key)); + if (value != null) { + assertEquals(receivedHeaderString, value); + assertEquals(resp.headers().allValues("X-" + key), List.of(value)); + } else { + assertEquals(resp.headers().allValues("X-" + key).size(), 1); + } + } + }) .join(); } } From 72df1c4018857195de5cef2b500840fb6ed1684c Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Mon, 7 Feb 2022 16:26:34 +0000 Subject: [PATCH 3/5] 8280786: Build failure on Solaris after 8262392 Reviewed-by: clanger Backport-of: 6837e1484bbeda710cde3763f0b0edb9c02351c2 --- .../unix/native/common/java2d/opengl/J2D_GL/glxext.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h b/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h index c0ba1b7cbe8..bfd7507cc1a 100644 --- a/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h +++ b/src/java.desktop/unix/native/common/java2d/opengl/J2D_GL/glxext.h @@ -698,8 +698,10 @@ int glXGetVideoInfoNV (Display *dpy, int screen, GLXVideoDeviceNV VideoDevice, u /* Define int32_t, int64_t, and uint64_t types for UST/MSC */ /* (as used in the GLX_OML_sync_control extension). */ #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L +/* JDK modification */ +#elif defined(__sun__) #include -#elif defined(__sun__) || defined(__digital__) +#elif defined(__digital__) #include #if defined(__STDC__) #if defined(__arch64__) || defined(_LP64) From 46238446866df758cff0f559cc350c0e138a29de Mon Sep 17 00:00:00 2001 From: J9 Build Date: Wed, 9 Feb 2022 04:05:09 +0000 Subject: [PATCH 4/5] Update OPENJDK_TAG to merged level jdk-11.0.14.1+1 Signed-off-by: J9 Build --- closed/openjdk-tag.gmk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/closed/openjdk-tag.gmk b/closed/openjdk-tag.gmk index 48e0afe05eb..fe2bb17d0da 100644 --- a/closed/openjdk-tag.gmk +++ b/closed/openjdk-tag.gmk @@ -1 +1 @@ -OPENJDK_TAG := jdk-11.0.14+9 +OPENJDK_TAG := jdk-11.0.14.1+1 From e73270e464c972df9680423e0d5081db8f8e073e Mon Sep 17 00:00:00 2001 From: Peter Shipton Date: Wed, 9 Feb 2022 08:22:12 -0500 Subject: [PATCH 5/5] Update versions to build 0.30.1 Fix copyright in custom-spec.gmk.in for previous commit that didn't update the copyright. https://github.com/ibmruntimes/openj9-openjdk-jdk11/commit/01f86654ee5 Signed-off-by: Peter Shipton --- closed/autoconf/custom-spec.gmk.in | 2 +- closed/get_j9_source.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/closed/autoconf/custom-spec.gmk.in b/closed/autoconf/custom-spec.gmk.in index 17786ba6246..0a78b1d8e04 100644 --- a/closed/autoconf/custom-spec.gmk.in +++ b/closed/autoconf/custom-spec.gmk.in @@ -1,5 +1,5 @@ # =========================================================================== -# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved +# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved # =========================================================================== # This code is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License version 2 only, as diff --git a/closed/get_j9_source.sh b/closed/get_j9_source.sh index 91ad7550dbb..a4283b33852 100644 --- a/closed/get_j9_source.sh +++ b/closed/get_j9_source.sh @@ -1,7 +1,7 @@ #!/bin/bash # =========================================================================== -# (c) Copyright IBM Corp. 2017, 2021 All Rights Reserved +# (c) Copyright IBM Corp. 2017, 2022 All Rights Reserved # =========================================================================== # # This code is free software; you can redistribute it and/or modify it @@ -57,10 +57,10 @@ declare -A shas declare -A references git_urls[openj9]=https://github.com/eclipse-openj9/openj9 -branches[openj9]=openj9-0.30.0 +branches[openj9]=openj9-0.30.1 git_urls[omr]=https://github.com/eclipse-openj9/openj9-omr -branches[omr]=openj9-0.30.0 +branches[omr]=openj9-0.30.1 pflag=false