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

MINOR: fix NPE by ignoring tombstones #1174

Merged
merged 1 commit into from Jul 25, 2019

Conversation

@rayokota
Copy link
Member

commented Jul 25, 2019

Currently tombstones are causing an NPE in KafkaStoreMessageHandler

@rayokota rayokota changed the base branch from master to 4.0.x Jul 25, 2019

@rayokota rayokota requested a review from avocader Jul 25, 2019

@@ -42,6 +42,10 @@ public KafkaStoreMessageHandler(KafkaSchemaRegistry schemaRegistry,
*/
@Override
public void handleUpdate(SchemaRegistryKey key, SchemaRegistryValue value) {
if (value == null) {

This comment has been minimized.

Copy link
@avocader

avocader Jul 25, 2019

Member

Should we also check for a key? How key looks like in case of a tombstone?

This comment has been minimized.

Copy link
@rayokota

rayokota Jul 25, 2019

Author Member

Keys are always non-null. Tombstones are always of the form (key, null).

This comment has been minimized.

Copy link
@avocader

avocader Jul 25, 2019

Member

Maybe just add a debug statement?

@rayokota

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Thanks for the review @avocader ! Let me know if there are any other changes you would like.

@avocader
Copy link
Member

left a comment

LGTM

@rayokota rayokota merged commit f57faaa into confluentinc:4.0.x Jul 25, 2019

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@rayokota rayokota deleted the rayokota:handler-npe branch Jul 25, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.