Issue #7266 - preserve old runtime.feature.alpn property

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
Lachlan Roberts 2021-12-14 12:50:31 +11:00
parent 65f135cf1a
commit 28b0128500
3 changed files with 3 additions and 6 deletions

View File

@ -1,4 +0,0 @@
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
[depend]
alpn-impl/alpn-11

View File

@ -5,7 +5,7 @@ Enables the ALPN (Application Layer Protocol Negotiation) TLS extension.
[depend]
ssl
alpn-impl/alpn-available-${runtime.feature.alpn}
alpn-impl/alpn-available-${at.least.java9}
[lib]
lib/jetty-alpn-client-${jetty.version}.jar

View File

@ -1502,7 +1502,8 @@ public class StartArgs
properties.setProperty("java.version.micro", Integer.toString(ver.getMicro()), "Deprecated");
// ALPN feature exists
properties.setProperty("runtime.feature.alpn", Boolean.toString(ver.getPlatform() >= 9), source);
properties.setProperty("runtime.feature.alpn", Boolean.toString(isMethodAvailable(javax.net.ssl.SSLParameters.class, "getApplicationProtocols", null)), source);
properties.setProperty("at.least.java9", Boolean.toString(ver.getPlatform() >= 9), source);
}
catch (Throwable x)
{