Skip to content

Commit

Permalink
Bazel: Remove explicit setting of java.security.manager on JDK 17
Browse files Browse the repository at this point in the history
Bazel specific issue was resolved: [1] so that there is no need
to set this parameter to allow.

Also remove java17 configuration, because it's not used any more.

[1] bazelbuild/bazel#14502

Release-Notes: skip
Change-Id: I93f7069a20fe55f8cfdfa8ec1f046b85554361f5
  • Loading branch information
davido committed Dec 1, 2023
1 parent 5e7c0b8 commit 4b50aae
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 16 deletions.
7 changes: 0 additions & 7 deletions BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,6 @@ load("//tools/bzl:pkg_war.bzl", "pkg_war")

package(default_visibility = ["//visibility:public"])

config_setting(
name = "java17",
values = {
"java_language_version": "17",
},
)

genrule(
name = "gen_version",
outs = ["version.txt"],
Expand Down
10 changes: 1 addition & 9 deletions tools/bzl/junit.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,6 @@ POST_JDK8_OPTS = [
"-Djava.locale.providers=COMPAT",
]

POST_JDK17_OPTS = [
# https://github.com/bazelbuild/bazel/issues/14502
"-Djava.security.manager=allow",
]

def junit_tests(name, srcs, **kwargs):
s_name = name.replace("-", "_") + "TestSuite"
_gen_suite(
Expand All @@ -86,10 +81,7 @@ def junit_tests(name, srcs, **kwargs):
outname = s_name,
)
jvm_flags = kwargs.get("jvm_flags", []) + POST_JDK8_OPTS
jvm_flags = jvm_flags + select({
"//:java17": POST_JDK8_OPTS + POST_JDK17_OPTS,
"//conditions:default": POST_JDK8_OPTS,
})
jvm_flags = jvm_flags + POST_JDK8_OPTS
java_test(
name = name,
test_class = s_name,
Expand Down

0 comments on commit 4b50aae

Please sign in to comment.