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

fix: prevent IOB when printing topics with a key/value with an empty string #7162

Merged
merged 2 commits into from
Mar 9, 2021

Conversation

mmolimar
Copy link
Contributor

@mmolimar mmolimar commented Mar 5, 2021

Description

When printing topics, the record formatter throws and Index Out of Bounds exception in case the key or value is an empty string because the deserializers might not have a format to use. This PR fix this checking if the possible formats are not empty.

Testing done

Included empty values in the tests which already exist to validate this behavior.

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@mmolimar mmolimar requested a review from a team as a code owner March 5, 2021 16:23
@ghost
Copy link

ghost commented Mar 5, 2021

@confluentinc It looks like @mmolimar just signed our Contributor License Agreement. 👍

Always at your service,

clabot

Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

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

Nice catch! Thanks @mmolimar

Copy link
Contributor

@guozhangwang guozhangwang left a comment

Choose a reason for hiding this comment

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

LGTM!

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