Skip to content

Commit 806a6e8

Browse files
authored
[7.6.0] Don't attempt to enable the Security Manager for jdk >= 24 (#25658)
Backports bazelbuild/rules_java@b3a0580 Fixes #25648
1 parent 4122595 commit 806a6e8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/starlark/builtins_bzl/bazel/java/bazel_java_binary.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def _bazel_base_binary_impl(ctx, is_test_rule_class):
6464
)
6565

6666
if ctx.attr.use_testrunner:
67-
if semantics.find_java_runtime_toolchain(ctx).version >= 17:
67+
_java_runtime_version = semantics.find_java_runtime_toolchain(ctx).version
68+
if _java_runtime_version >= 17 and _java_runtime_version < 24:
6869
jvm_flags.append("-Djava.security.manager=allow")
6970
test_class = ctx.attr.test_class if hasattr(ctx.attr, "test_class") else ""
7071
if test_class == "":

0 commit comments

Comments
 (0)