Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
put("tests.gradle", "true");
put("tests.artifact", project.getName());
put("tests.task", test.getPath());
put("tests.security.manager", "true");
put("tests.security.manager", "false");

Check warning on line 154 in buildSrc/src/main/java/org/opensearch/gradle/OpenSearchTestBasePlugin.java

View check run for this annotation

Codecov / codecov/patch

buildSrc/src/main/java/org/opensearch/gradle/OpenSearchTestBasePlugin.java#L154

Added line #L154 was not covered by tests
put("jna.nosys", "true");
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,9 @@ public final BootstrapCheckResult check(BootstrapContext context) {
@SuppressWarnings("removal")
boolean isAllPermissionGranted() {
final SecurityManager sm = System.getSecurityManager();
assert sm != null;
if (sm == null) {
return true;
}
try {
sm.checkPermission(new AllPermission());
} catch (final SecurityException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public class BootstrapForTesting {
IfConfig.logIfNecessary();

// install security manager if requested
if (systemPropertyAsBoolean("tests.security.manager", true)) {
if (systemPropertyAsBoolean("tests.security.manager", false)) {
try {
// initialize paths the same exact way as bootstrap
Permissions perms = new Permissions();
Expand Down
Loading