From 03a149b959f163ac452058cf8564f2033f14bb92 Mon Sep 17 00:00:00 2001 From: mattison chao Date: Wed, 11 May 2022 15:36:29 +0800 Subject: [PATCH] [Fix][broker] Fix JDK17 compatibility issues. --- bin/pulsar | 3 +++ pom.xml | 2 ++ 2 files changed, 5 insertions(+) diff --git a/bin/pulsar b/bin/pulsar index 1d1f7eb3e5086..f19d818cd2e27 100755 --- a/bin/pulsar +++ b/bin/pulsar @@ -283,6 +283,9 @@ if [[ -z "$IS_JAVA_8" ]]; then # https://github.com/netty/netty/blob/4.1/common/src/main/java/io/netty/util/internal/PlatformDependent0.java # https://github.com/netty/netty/issues/12265 OPTS="$OPTS --add-opens java.base/java.nio=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED" + # netty.DnsResolverUtil + # JvmDefaultGCMetricsLogger + OPTS="$OPTS --add-opens java.base/sun.net=ALL-UNNAMED --add-opens java.management/sun.management=ALL-UNNAMED" fi OPTS="-cp $PULSAR_CLASSPATH $OPTS" diff --git a/pom.xml b/pom.xml index 3d2b69d8d0f1d..e39a9d9c07aaa 100644 --- a/pom.xml +++ b/pom.xml @@ -96,6 +96,8 @@ flexible messaging model and an intuitive client API. --add-opens java.base/jdk.internal.loader=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED + --add-opens java.base/sun.net=ALL-UNNAMED + --add-opens java.management/sun.management=ALL-UNNAMED true 4