8278967: rmiregistry fails to start because SecurityManager is disabled

Reviewed-by: alanb, erikj
This commit is contained in:
Stuart Marks 2021-12-22 18:56:30 +00:00
parent 2be3e7ef1c
commit 04ee9211fc
2 changed files with 7 additions and 3 deletions

View File

@ -27,4 +27,5 @@ include LauncherCommon.gmk
$(eval $(call SetupBuildLauncher, rmiregistry, \
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
JAVA_ARGS := -Djava.security.manager=allow, \
))

View File

@ -23,7 +23,7 @@
/**
* @test
* @bug 6545058 6611182 8016209 8139986 8162746
* @bug 6545058 6611182 8016209 8139986 8162746 8278967
* @summary validate and test -version, -fullversion, and internal, as well as
* sanity checks if a tool can be launched.
* @modules jdk.compiler
@ -126,9 +126,12 @@ public class VersionCheck extends TestHelper {
static String getVersion0(boolean allLines, String... argv) {
TestHelper.TestResult tr = doExec(argv);
StringBuilder out = new StringBuilder();
// remove the HotSpot line
// remove the HotSpot line and security manager deprecation warnings
for (String x : tr.testOutput) {
if (allLines || !x.matches(".*Client.*VM.*|.*Server.*VM.*")) {
if (allLines || !x.matches(".*Client.*VM.*|" +
".*Server.*VM.*|" +
"WARNING:.*terminally.*deprecated.*|" +
"WARNING:.*System::setSecurityManager.*")) {
out = out.append(x + "\n");
}
}