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: find bugs issue in KafkaTopicClientImpl #3268

Merged
merged 1 commit into from
Aug 28, 2019

Conversation

big-andy-coates
Copy link
Contributor

Description

Find bugs issue to do with incorrect number of arguments to String.format.

Of course, we all know you shouldn't use String.format in log lines anyway ;)

Testing done

mvn test

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 #")

@big-andy-coates big-andy-coates requested a review from a team as a code owner August 24, 2019 11:21
Copy link
Member

@spena spena left a comment

Choose a reason for hiding this comment

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

Looks good,

Question: why should not we use string.format in log lines? I think I got used to using it at some point when I found LOG wasn't allowing me to put more than 4 parameters.

@big-andy-coates
Copy link
Contributor Author

Question: why should not we use string.format in log lines? I think I got used to using it at some point when I found LOG wasn't allowing me to put more than 4 parameters.

the log calls take varargs, so you can pass as many arguments as you want.

The benefit of these calls over String format is that the later does the string manipulation even if the logger is disabled, where as the former is virtually a no-op if the logger is disabled.

@big-andy-coates big-andy-coates merged commit 70e880f into confluentinc:master Aug 28, 2019
@big-andy-coates big-andy-coates deleted the fix_find_bugs branch August 28, 2019 10:44
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.

2 participants