Fixed illegal reflective access by not relying on a sun.net.dns class. (#8318)#8319
Merged
normanmaurer merged 2 commits intonetty:4.1from Sep 26, 2018
mattayres:4.1
Merged
Fixed illegal reflective access by not relying on a sun.net.dns class. (#8318)#8319normanmaurer merged 2 commits intonetty:4.1from mattayres:4.1
normanmaurer merged 2 commits intonetty:4.1from
mattayres:4.1
Conversation
|
Can one of the admins verify this patch? |
Member
|
@netty-bot test this please |
normanmaurer
requested changes
Sep 26, 2018
Member
normanmaurer
left a comment
There was a problem hiding this comment.
One question / suggestion. Otherwise LGTM
|
|
||
| @SuppressWarnings("unchecked") | ||
| List<String> list = (List<String>) nameservers.invoke(instance); | ||
| List<String> list = UnixResolverDnsServerAddressStreamProvider.parseEtcResolverSearchDomains(); |
Member
There was a problem hiding this comment.
@mattayres What about non unix like systems (for example windows) ? Maybe we can use PlatformDependent.isWindows() and only use this if it returns false ?
Contributor
Author
There was a problem hiding this comment.
@normanmaurer That's a good point. I've made the change you suggested.
normanmaurer
approved these changes
Sep 26, 2018
Member
|
@netty-bot test this please |
Member
|
@mattayres can you sign our ICLA and ping me once done: |
Contributor
Author
|
@normanmaurer signed ICLA. |
Member
|
@mattayres thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Applications should not depend on internal packages with Java 9 and later. This cause a warning now, but will break in future versions of Java.
Modification
This change adds methods to
UnixResolverDnsServerAddressStreamProvider(following after #6844) that parse/etc/resolv.conffordomainandsearchentries. ThenDnsNameResolverdoes not need to rely onsun.net.dns.ResolverConfigurationto do this.Result
Fixes #8318. Furthermore, at least in my testing with Java 11, this also makes multiple
searchentries work properly (previously I was only getting the first entry).