Skip to content

Conversation

@costin
Copy link
Member

@costin costin commented Oct 31, 2018

Add registration (and tests) for missing processors in the serialization
chain.

Fix #35119

Add registration (and tests) for missing processors in the serialization
chain.

Fix elastic#35119
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search-aggs

Copy link
Contributor

@matriv matriv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! just a typo in assertion msg

@costin costin added v6.5.1 and removed v6.5.0 labels Oct 31, 2018
Copy link
Contributor

@astefan astefan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Just one question

try {
value = name.get(proc).toString();
} catch (Exception ex) {
fail(procName + " does NOT provide a String NAME field\n" + ex);
Copy link
Contributor

@astefan astefan Oct 31, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not exactly sure what you are doing here. The toString() will always give you a String... and get(proc) can throw an IllegalAccessException if the field is inaccessible (static, since proc.getField will check the public part). So why the "does not provide a String NAME field"? Sorry if I missed something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

toString() is a shortcut for casting which also checks the value; it fails if the value is null.
The check is really for checking the field is static - I've updated the message as it was misleading.

@costin costin merged commit f87a534 into elastic:master Oct 31, 2018
@costin costin deleted the fix-35119 branch October 31, 2018 21:07
costin added a commit that referenced this pull request Oct 31, 2018
Add registration (and tests) for missing processors in the serialization
chain.

Fix #35119

(cherry picked from commit f87a534)
costin added a commit that referenced this pull request Oct 31, 2018
Add registration (and tests) for missing processors in the serialization
chain.

Fix #35119

(cherry picked from commit f87a534)
@colings86 colings86 added v6.5.0 and removed v6.5.1 labels Nov 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants