Fix ArrayIndexOutOfBoundsException in DnsStringLookup for '|' key - #765
Merged
Merged
Conversation
Member
|
@dxbjavid Please rebase on git master which will address the Javadoc 8 failure. |
dxbjavid
force-pushed
the
dns-lookup-delimiter-key
branch
from
August 24, 2026 04:57
d0b45e7 to
c2baed3
Compare
Contributor
Author
|
rebased onto master, so the Javadoc 8 failure should be sorted now. thanks for the pointer. |
uros-b
approved these changes
Aug 24, 2026
Member
|
+1, LGTM |
Member
|
@dxbjavid Thank you, merged 🚀 |
garydgregory
added a commit
that referenced
this pull request
Aug 25, 2026
(#765). - Add action to changes.xml. - Use longer lines. - Sort members.
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.
DnsStringLookup.lookupsplits the key on|and readskeys[0]before it checks the array length, so a key made up of only delimiter or whitespace characters (for example the interpolation${dns:|}, or||) splits to an empty array and throws anArrayIndexOutOfBoundsExceptionstraight out of the public lookup instead of resolving to nothing. Every other split-based lookup in this package (FileStringLookup,UrlStringLookup,PropertiesStringLookup,XmlStringLookup,ScriptStringLookup,ResourceBundleStringLookup) guards the length before indexing, so this is the odd one out. I've returnednullfor that case, which is what the method already does for a null key and for a host that will not resolve, so the behaviour stays consistent and no valid key changes.mvn; that'smvnon the command line by itself.