Issue #5492 - changed from review
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
2aa1a68079
commit
f2bed1368b
|
@ -1506,16 +1506,13 @@ public class StartArgs
|
||||||
JavaVersion ver = JavaVersion.parse(value);
|
JavaVersion ver = JavaVersion.parse(value);
|
||||||
properties.setProperty("java.version.platform", Integer.toString(ver.getPlatform()), source);
|
properties.setProperty("java.version.platform", Integer.toString(ver.getPlatform()), source);
|
||||||
|
|
||||||
// features built into java.
|
|
||||||
// In Jetty 10+ these will always be true, but still need to stick around for users that
|
|
||||||
// want to move between Jetty 9.4.x and 10.0.x+
|
|
||||||
properties.setProperty("runtime.feature.alpn", Boolean.toString(isMethodAvailable(javax.net.ssl.SSLParameters.class, "getApplicationProtocols", null)), source);
|
|
||||||
properties.setProperty("runtime.feature.jpms", Boolean.toString(isClassAvailable("java.lang.ModuleLayer")), source);
|
|
||||||
|
|
||||||
// @deprecated - below will be removed in Jetty 10.x
|
// @deprecated - below will be removed in Jetty 10.x
|
||||||
properties.setProperty("java.version.major", Integer.toString(ver.getMajor()), "Deprecated");
|
properties.setProperty("java.version.major", Integer.toString(ver.getMajor()), "Deprecated");
|
||||||
properties.setProperty("java.version.minor", Integer.toString(ver.getMinor()), "Deprecated");
|
properties.setProperty("java.version.minor", Integer.toString(ver.getMinor()), "Deprecated");
|
||||||
properties.setProperty("java.version.micro", Integer.toString(ver.getMicro()), "Deprecated");
|
properties.setProperty("java.version.micro", Integer.toString(ver.getMicro()), "Deprecated");
|
||||||
|
|
||||||
|
// ALPN feature exists
|
||||||
|
properties.setProperty("runtime.feature.alpn", Boolean.toString(isMethodAvailable(javax.net.ssl.SSLParameters.class, "getApplicationProtocols", null)), source);
|
||||||
}
|
}
|
||||||
catch (Throwable x)
|
catch (Throwable x)
|
||||||
{
|
{
|
||||||
|
@ -1545,19 +1542,6 @@ public class StartArgs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isClassAvailable(String clazzname)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Class.forName(clazzname, false, this.getClass().getClassLoader());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (ClassNotFoundException e)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setRun(boolean run)
|
public void setRun(boolean run)
|
||||||
{
|
{
|
||||||
this.run = run;
|
this.run = run;
|
||||||
|
|
Loading…
Reference in New Issue