Skip to content

Commit

Permalink
Use JDK 11 for bootstrap build
Browse files Browse the repository at this point in the history
which is necessary to enable the use of Java 11 language features.

PiperOrigin-RevId: 422598120
  • Loading branch information
cushon authored and copybara-github committed Jan 18, 2022
1 parent 35d9be3 commit 63c9238
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion scripts/bootstrap/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if [ -n "${EMBED_LABEL}" ]; then
EMBED_LABEL_ARG=(--stamp --embed_label "${EMBED_LABEL}")
fi

: ${JAVA_VERSION:="1.8"}
: ${JAVA_VERSION:="11"}

_BAZEL_ARGS="--spawn_strategy=standalone \
--nojava_header_compilation \
Expand Down
6 changes: 3 additions & 3 deletions scripts/bootstrap/buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ function fail() {
DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
WORKSPACE_DIR="$(dirname "$(dirname "${DIR}")")"

JAVA_VERSION=${JAVA_VERSION:-1.8}
JAVA_VERSION=${JAVA_VERSION:-11}
BAZELRC=${BAZELRC:-"/dev/null"}
PLATFORM="$(uname -s | tr 'A-Z' 'a-z')"

Expand All @@ -90,12 +90,12 @@ linux)

freebsd)
# JAVA_HOME must point to a Java installation.
JAVA_HOME="${JAVA_HOME:-/usr/local/openjdk8}"
JAVA_HOME="${JAVA_HOME:-/usr/local/openjdk11}"
;;

openbsd)
# JAVA_HOME must point to a Java installation.
JAVA_HOME="${JAVA_HOME:-/usr/local/jdk-1.8.0}"
JAVA_HOME="${JAVA_HOME:-/usr/local/jdk-11}"
;;

darwin)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private MessageDigest getMessageDigestInstance() {

private static boolean supportsClone(MessageDigest toCheck) {
try {
Object unused = toCheck.clone();
var unused = toCheck.clone();
return true;
} catch (CloneNotSupportedException e) {
return false;
Expand Down

0 comments on commit 63c9238

Please sign in to comment.