Skip to content

Commit 04ee921

Browse files
author
Stuart Marks
committed
8278967: rmiregistry fails to start because SecurityManager is disabled
Reviewed-by: alanb, erikj
1 parent 2be3e7e commit 04ee921

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

make/modules/java.rmi/Launcher.gmk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,5 @@ include LauncherCommon.gmk
2727

2828
$(eval $(call SetupBuildLauncher, rmiregistry, \
2929
MAIN_CLASS := sun.rmi.registry.RegistryImpl, \
30+
JAVA_ARGS := -Djava.security.manager=allow, \
3031
))

test/jdk/tools/launcher/VersionCheck.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
/**
2525
* @test
26-
* @bug 6545058 6611182 8016209 8139986 8162746
26+
* @bug 6545058 6611182 8016209 8139986 8162746 8278967
2727
* @summary validate and test -version, -fullversion, and internal, as well as
2828
* sanity checks if a tool can be launched.
2929
* @modules jdk.compiler
@@ -126,9 +126,12 @@ static String getVersion(String... argv) {
126126
static String getVersion0(boolean allLines, String... argv) {
127127
TestHelper.TestResult tr = doExec(argv);
128128
StringBuilder out = new StringBuilder();
129-
// remove the HotSpot line
129+
// remove the HotSpot line and security manager deprecation warnings
130130
for (String x : tr.testOutput) {
131-
if (allLines || !x.matches(".*Client.*VM.*|.*Server.*VM.*")) {
131+
if (allLines || !x.matches(".*Client.*VM.*|" +
132+
".*Server.*VM.*|" +
133+
"WARNING:.*terminally.*deprecated.*|" +
134+
"WARNING:.*System::setSecurityManager.*")) {
132135
out = out.append(x + "\n");
133136
}
134137
}

0 commit comments

Comments
 (0)