From 8422c1d7e9ef479f348e63c530789050b5235426 Mon Sep 17 00:00:00 2001 From: Tomo Suzuki Date: Wed, 10 Nov 2021 10:12:18 -0500 Subject: [PATCH] fix: dependencies.sh to work with Java 17 (#516) CC: @Neenu1995 --- .kokoro/dependencies.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh index 9a5105d7..240e0747 100755 --- a/.kokoro/dependencies.sh +++ b/.kokoro/dependencies.sh @@ -37,16 +37,13 @@ function determineMavenOpts() { | sed -E 's/^.*"(.*?)".*$/\1/g' \ | sed -E 's/^(1\.[0-9]\.0).*$/\1/g' ) - - case $javaVersion in - "17") + if [[ $javaVersion == 17* ]] + then # MaxPermSize is no longer supported as of jdk 17 echo -n "-Xmx1024m" - ;; - *) + else echo -n "-Xmx1024m -XX:MaxPermSize=128m" - ;; - esac + fi } export MAVEN_OPTS=$(determineMavenOpts)