This is an automated email from the ASF dual-hosted git repository.

snuyanzin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 3052f6469bad9ef7db33ade8de65b235143d437e
Author: Sergey Nuyanzin <[email protected]>
AuthorDate: Mon May 25 13:44:41 2026 +0200

    [hotfix] Allow security manager only if java version is less than 24
---
 flink-dist/src/main/flink-bin/bin/config.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/flink-dist/src/main/flink-bin/bin/config.sh 
b/flink-dist/src/main/flink-bin/bin/config.sh
index e6c476c89f0..91b91dc5789 100755
--- a/flink-dist/src/main/flink-bin/bin/config.sh
+++ b/flink-dist/src/main/flink-bin/bin/config.sh
@@ -287,7 +287,7 @@ if [ -z "${FLINK_ENV_JAVA_OPTS}" ]; then
     FLINK_ENV_JAVA_OPTS="-XX:+IgnoreUnrecognizedVMOptions $( echo 
"${FLINK_ENV_JAVA_OPTS}" | sed -e 's/^"//'  -e 's/"$//' )"
 
     JAVA_SPEC_VERSION=`"${JAVA_RUN}" -XshowSettings:properties 2>&1 | grep 
"java.specification.version" | cut -d "=" -f 2 | tr -d '[:space:]' | rev | cut 
-d "." -f 1 | rev`
-    if [[ $(( $JAVA_SPEC_VERSION > 17 )) == 1 ]]; then
+    if [[ $JAVA_SPEC_VERSION -gt 17 && $JAVA_SPEC_VERSION -lt 24 ]]; then
       # set security manager property to allow calls to 
System.setSecurityManager() at runtime
       FLINK_ENV_JAVA_OPTS="$FLINK_ENV_JAVA_OPTS -Djava.security.manager=allow"
     fi

Reply via email to