From cb2755306975de4c54ea549c9deb25703b3731bb Mon Sep 17 00:00:00 2001 From: kolea2 <45548808+kolea2@users.noreply.github.com> Date: Mon, 25 Oct 2021 11:06:10 -0400 Subject: [PATCH] fix(java): java 17 dependency arguments (#1266) --- .../gcp/templates/java_library/.kokoro/dependencies.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/synthtool/gcp/templates/java_library/.kokoro/dependencies.sh b/synthtool/gcp/templates/java_library/.kokoro/dependencies.sh index 9a5105d7e..d7476cfe9 100755 --- a/synthtool/gcp/templates/java_library/.kokoro/dependencies.sh +++ b/synthtool/gcp/templates/java_library/.kokoro/dependencies.sh @@ -38,15 +38,13 @@ function determineMavenOpts() { | 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)