Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use a JDK version-specific toolchain in
bazel_java_test.sh
e.g. for ` //src/test/shell/bazel:bazel_java_test_jdk16_toolchain_head`, this test was previously using `@bazel_tools//tools/jdk:toolchain`, which was leaking the toolchain from the enclosing version of Bazel. It worked anyways because turbine was always producing JDK 8 class files, but as of google/turbine@006a74b turbine uses the class file version corresponding to the `-target` or `--release` flag. This fixes e.g. ``` java/com/google/sandwich/B.java:3: error: cannot access C C myObject; ^ bad class file: bazel-out/k8-fastbuild/bin/java/com/google/sandwich/libbottom-hjar.jar(/com/google/sandwich/C.class) class file has wrong version 59.0, should be 55.0 Please remove or make sure it appears in the correct subdirectory of the classpath. ``` from #14059 PiperOrigin-RevId: 399738050
- Loading branch information