Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a merge function on the Event interface. #5316

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dlvenable
Copy link
Member

Description

This adds a new method merge on the Event interface. It will merge fields from another Event into the current Event. It only adds new values and will not remove any values. It does override existing values with any from the other Event.

Issues Resolved

None

Contributes toward #5312.

Check List

  • New functionality includes testing.
  • New functionality has a documentation issue. Please link to it in this PR.
    • New functionality has javadoc added
  • Commits are signed with a real name per the DCO

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…the fields from another Event into the current event. Contributes toward opensearch-project#5312.

Signed-off-by: David Venable <[email protected]>
}
final ObjectNode otherObjectNode = (ObjectNode) otherJacksonEvent.jsonNode;

if(!(jsonNode instanceof ObjectNode)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

probably a nit but being more explicit like this.jsonNode makes it more readable? in the first read, I was looking for a local variable called jsonNode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants