Make transport.Bootstrap usable with no netty-resolver on classpath#13488
Merged
normanmaurer merged 2 commits intonetty:4.1from Jul 18, 2023
Merged
Make transport.Bootstrap usable with no netty-resolver on classpath#13488normanmaurer merged 2 commits intonetty:4.1from
normanmaurer merged 2 commits intonetty:4.1from
Conversation
Motivation: Since some address families (e.g. unix sockets) do not need name resolver, It should be possible to exclude netty-resolver from classpath. Currently excluding name resolver leads to NoClassDefFoundError: AddressResolverGroup during Bootstrap instantiation. Modification: Add disableResolver() method to Bootstrap. Change BootstrapConfig.resolver() return null if Bootstrap.disableResolver() is called. Introduce ExternalAddressResolver class to hold AddressResolver related references to avoid NoClassDefFoundError if Bootstrap.disableResolver() called and no netty-resolver is on classpath. Result: Bootstrap is usable with no netty-resolver on classpath.
Member
|
@mostroverkhov so is the only motivation for this to be able to remove one dependency ? |
Contributor
Author
|
@normanmaurer to remove dependency which cant have any use for unix or vm sockets - just dead weight. |
normanmaurer
approved these changes
Jul 17, 2023
Member
|
@chrisvest @franz1981 WDYT ? |
chrisvest
approved these changes
Jul 17, 2023
5838edc to
ccd0ee6
Compare
Co-authored-by: Chris Vest <mr.chrisvest@gmail.com>
ccd0ee6 to
fcf9be6
Compare
normanmaurer
pushed a commit
that referenced
this pull request
Jul 18, 2023
…13488) Motivation: Since some address families (e.g. unix sockets) do not need name resolver, It should be possible to exclude netty-resolver from classpath. Currently excluding name resolver leads to NoClassDefFoundError: AddressResolverGroup during Bootstrap instantiation. Modification: Add disableResolver() method to Bootstrap. Change BootstrapConfig.resolver() return null if Bootstrap.disableResolver() is called. Introduce ExternalAddressResolver class to hold AddressResolver related references to avoid NoClassDefFoundError if Bootstrap.disableResolver() called and no netty-resolver is on classpath. Result: Bootstrap is usable with no netty-resolver on classpath. --------- Co-authored-by: Chris Vest <mr.chrisvest@gmail.com>
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:
Since some address families (e.g. unix sockets) do not need name resolver, It should be possible to exclude netty-resolver from classpath.
Currently excluding name resolver leads to NoClassDefFoundError: AddressResolverGroup during Bootstrap instantiation.
Modification:
Add disableResolver() method to Bootstrap.
Change BootstrapConfig.resolver() return null if Bootstrap.disableResolver() is called.
Introduce ExternalAddressResolver class to hold AddressResolver related references to avoid NoClassDefFoundError if Bootstrap.disableResolver() called and no netty-resolver is on classpath.
Result:
Bootstrap is usable with no netty-resolver on classpath.