Merge remote-tracking branch 'origin/jetty-9.4.x' into jetty-10.0.x
This commit is contained in:
commit
40b42c9388
|
@ -1,12 +0,0 @@
|
||||||
# DO NOT EDIT - See: https://www.eclipse.org/jetty/documentation/current/startup-modules.html
|
|
||||||
|
|
||||||
[description]
|
|
||||||
Enables test setup
|
|
||||||
|
|
||||||
[depend]
|
|
||||||
http
|
|
||||||
|
|
||||||
|
|
||||||
[xml]
|
|
||||||
etc/test-jetty.xml
|
|
||||||
|
|
|
@ -1528,10 +1528,14 @@ 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);
|
||||||
|
|
||||||
// @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)
|
||||||
{
|
{
|
||||||
|
@ -1548,6 +1552,19 @@ public class StartArgs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean isMethodAvailable(Class<?> clazz, String methodName, Class<?>[] params)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
clazz.getMethod(methodName, params);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
catch (NoSuchMethodException e)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setRun(boolean run)
|
public void setRun(boolean run)
|
||||||
{
|
{
|
||||||
this.run = run;
|
this.run = run;
|
||||||
|
|
|
@ -138,6 +138,7 @@ public class ConfigurationAssert
|
||||||
"jetty.base.uri".equals(name) ||
|
"jetty.base.uri".equals(name) ||
|
||||||
"user.dir".equals(name) ||
|
"user.dir".equals(name) ||
|
||||||
prop.source.equals(Props.ORIGIN_SYSPROP) ||
|
prop.source.equals(Props.ORIGIN_SYSPROP) ||
|
||||||
|
name.startsWith("runtime.feature.") ||
|
||||||
name.startsWith("java."))
|
name.startsWith("java."))
|
||||||
{
|
{
|
||||||
// strip these out from assertion, to make assertions easier.
|
// strip these out from assertion, to make assertions easier.
|
||||||
|
|
|
@ -220,8 +220,11 @@ public class MainTest
|
||||||
{
|
{
|
||||||
Path distPath = MavenTestingUtils.getTestResourceDir("dist-home").toPath().toRealPath();
|
Path distPath = MavenTestingUtils.getTestResourceDir("dist-home").toPath().toRealPath();
|
||||||
Path homePath = MavenTestingUtils.getTargetTestingPath().resolve("dist home with spaces");
|
Path homePath = MavenTestingUtils.getTargetTestingPath().resolve("dist home with spaces");
|
||||||
IO.copy(distPath.toFile(), homePath.toFile());
|
if (!Files.exists(homePath))
|
||||||
Files.createFile(homePath.resolve("lib/a library.jar"));
|
{
|
||||||
|
IO.copy(distPath.toFile(), homePath.toFile());
|
||||||
|
Files.createFile(homePath.resolve("lib/a library.jar"));
|
||||||
|
}
|
||||||
|
|
||||||
List<String> cmdLineArgs = new ArrayList<>();
|
List<String> cmdLineArgs = new ArrayList<>();
|
||||||
cmdLineArgs.add("user.dir=" + homePath);
|
cmdLineArgs.add("user.dir=" + homePath);
|
||||||
|
|
Loading…
Reference in New Issue