Return appropriate error on null dims update instead of npe#125716
Merged
elasticsearchmachine merged 3 commits intoelastic:mainfrom Mar 26, 2025
Merged
Return appropriate error on null dims update instead of npe#125716elasticsearchmachine merged 3 commits intoelastic:mainfrom
elasticsearchmachine merged 3 commits intoelastic:mainfrom
Conversation
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
Collaborator
|
Hi @benwtrent, I've created a changelog YAML for you. |
|
|
||
| return XContentMapValues.nodeIntegerValue(o); | ||
| }, m -> toType(m).fieldType().dims, XContentBuilder::field, Object::toString).setSerializerCheck((id, ic, v) -> v != null) | ||
| }, m -> toType(m).fieldType().dims, XContentBuilder::field, Objects::toString).setSerializerCheck((id, ic, v) -> v != null) |
Contributor
There was a problem hiding this comment.
nit: this is kinda gross to read; might help in the future to see that default value on a separate line which might have maybe might have made it more obvious that Objects::toString is needed here more similar to how this is formatted in DateScriptFieldType:65 which breaks this Parameter instantiation out into an arg per line.
Collaborator
💔 Backport failed
You can use sqren/backport to manually backport by running |
This was referenced Mar 27, 2025
Member
Author
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
benwtrent
added a commit
to benwtrent/elasticsearch
that referenced
this pull request
Mar 27, 2025
…125716) Calling `Object::toString` was trying to call `null.toString()`, really it should have been `Objects::toString`, which accepts `null`. closes: elastic#125713 (cherry picked from commit dd58b0b)
benwtrent
added a commit
to benwtrent/elasticsearch
that referenced
this pull request
Mar 27, 2025
…125716) Calling `Object::toString` was trying to call `null.toString()`, really it should have been `Objects::toString`, which accepts `null`. closes: elastic#125713 (cherry picked from commit dd58b0b)
elasticsearchmachine
pushed a commit
that referenced
this pull request
Mar 27, 2025
elasticsearchmachine
pushed a commit
that referenced
this pull request
Mar 27, 2025
mark-vieira
pushed a commit
that referenced
this pull request
Mar 27, 2025
omricohenn
pushed a commit
to omricohenn/elasticsearch
that referenced
this pull request
Mar 28, 2025
…125716) Calling `Object::toString` was trying to call `null.toString()`, really it should have been `Objects::toString`, which accepts `null`. closes: elastic#125713
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.
Calling
Object::toStringwas trying to callnull.toString(), really it should have beenObjects::toString, which acceptsnull.closes: #125713