-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[improve][misc] Remove the call to sun InetAddressCachePolicy #22329
Conversation
…urity standard parameters
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution! I added a review.
pulsar-common/src/main/java/org/apache/pulsar/common/util/netty/DnsResolverUtil.java
Outdated
Show resolved
Hide resolved
pulsar-common/src/main/java/org/apache/pulsar/common/util/netty/DnsResolverUtil.java
Show resolved
Hide resolved
pulsar-common/src/test/java/org/apache/pulsar/common/util/netty/DnsResolverTest.java
Outdated
Show resolved
Hide resolved
pulsar-common/src/test/java/org/apache/pulsar/common/util/netty/DnsResolverTest.java
Outdated
Show resolved
Hide resolved
…y/DnsResolverTest.java Co-authored-by: Lari Hotari <lhotari@users.noreply.github.com>
pulsar-common/src/test/java/org/apache/pulsar/common/util/netty/DnsResolverTest.java
Outdated
Show resolved
Hide resolved
pulsar-common/src/main/java/org/apache/pulsar/common/util/netty/DnsResolverUtil.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Lari Hotari <lhotari@apache.org> (cherry picked from commit cce0b05)
Co-authored-by: Lari Hotari <lhotari@apache.org> (cherry picked from commit cce0b05)
…#22329) Co-authored-by: Lari Hotari <lhotari@apache.org>
It was great that this change was made. It revealed a long time bug in the Dockerfile used in Pulsar 3.0.x, 3.1.x and 3.2.x versions. More explanation in comment #22400 (comment) . |
…#22329) Co-authored-by: Lari Hotari <lhotari@apache.org>
Main Issue: #20282
Motivation
I'm presently working with Spring Boot 3 and JDK 17. While utilizing Pulsar, I encountered an error indicating that reflection on content under the 'sun' package is restricted. After reviewing Pulsar-related issues, I found a suggestion to resolve this by using
--add-opens java.base/sun.net=ALL-UNNAMED
. However, this workaround isn't suitable and doesn't effectively address the issue. Hence, I've created this PR.Modifications
The environment variables
networkaddress.cache.ttl
andnetworkaddress.cache.negative.ttl
are standard configurations for obtaining related settings for security purposes.I've made modifications to the
org.apache.pulsar.common.util.netty.DnsResolverUtil
method, eliminating its dependency on thesun.net.InetAddressCachePolicy
class for obtaining DNS TTL. Thesun.net.InetAddressCachePolicy
class is currently removal.java early_access jdk net-properties
oracle jdk8 net-properties
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Documentation
doc
doc-required
doc-not-needed
doc-complete
Matching PR in forked repository
PR in forked repository: