Skip to content

Commit

Permalink
Initial fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
seanjmullan committed Mar 3, 2025
1 parent e98df71 commit 11343c4
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions test/jdk/java/lang/System/SecurityManagerWarnings.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2021, 2025, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -53,8 +53,7 @@ public static void main(String args[]) throws Exception {

JarUtils.createJarFile(Path.of("a.jar"),
Path.of(testClasses),
Path.of("SecurityManagerWarnings.class"),
Path.of("A.class"));
Path.of(testClasses));

failLateTest(null, "a.jar");
} else {
Expand All @@ -72,8 +71,8 @@ public static void main(String args[]) throws Exception {
}
}

// When -Djava.security.manager is not set, or set to "allow",
// or "disallow", JVM starts but setSecurityManager will fail.
// When -Djava.security.manager is not set or set to "disallow",
// JVM starts but setSecurityManager will fail.
static void failLateTest(String prop, String cp) throws Exception {
run(prop, cp)
.shouldNotHaveExitValue(0)
Expand Down

0 comments on commit 11343c4

Please sign in to comment.