Skip to content

Add null checks to handle null new image and old image in StreamRecord #254

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

Merged
merged 1 commit into from
Aug 31, 2022

Conversation

yongruigao
Copy link

Issue #, if available:
None

Description of changes:
Old image and new image don't always exist in the DynamoDB stream record. When either of them don't exist, a NullPointerException would be thrown without null checks. The same null checks exist in com.amazonaws.services.lambda.runtime.events.transformers.v2.dynamodb.DynamodbStreamRecordTransformer, but not com.amazonaws.services.lambda.runtime.events.transformers.v1.dynamodb.DynamodbStreamRecordTransformer

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@msailes
Copy link
Contributor

msailes commented Jun 21, 2021

Hi @yongruigao,

Thanks for the PR! I'll have a look at it and see if we can put it into the next release.

Mark

@msailes msailes added the bug label Jun 21, 2021
@msailes
Copy link
Contributor

msailes commented Jun 21, 2021

Looks good to me. @carlzogh your thoughts?

Copy link
Contributor

@carlzogh carlzogh left a comment

Choose a reason for hiding this comment

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

LGTM - thanks for the contribution!

@andclt andclt changed the base branch from master to events-v4-serialization-v2 August 10, 2022 08:33
@andclt andclt changed the base branch from events-v4-serialization-v2 to master August 10, 2022 08:50
@andclt andclt changed the base branch from master to events-v4-serialization-v2 August 10, 2022 08:50
@msailes
Copy link
Contributor

msailes commented Aug 10, 2022

@yongruigao, can you rebase this branch from aws:events-v4-serialization-v2

Thanks.

@andclt andclt merged commit 52a2845 into aws:events-v4-serialization-v2 Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants