Skip to content

Commit b3a0580

Browse files
hvadehrarules_java Copybara
authored andcommitted
Don't attempt to enable the Security Manager for jdk >= 24
The Security Manager is being permanently disabled in JDK 24, see https://openjdk.org/jeps/486 PiperOrigin-RevId: 704307132 Change-Id: I95501503206a85b6d9f828c4c6ab8e1fb3313eef
1 parent 449303e commit b3a0580

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

java/bazel/rules/bazel_java_binary.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ def bazel_base_binary_impl(ctx, is_test_rule_class):
7575
)
7676

7777
if ctx.attr.use_testrunner:
78-
if semantics.find_java_runtime_toolchain(ctx).version >= 17:
78+
_java_runtime_version = semantics.find_java_runtime_toolchain(ctx).version
79+
if _java_runtime_version >= 17 and _java_runtime_version < 24:
7980
jvm_flags.append("-Djava.security.manager=allow")
8081
test_class = ctx.attr.test_class if hasattr(ctx.attr, "test_class") else ""
8182
if test_class == "":

0 commit comments

Comments
 (0)