Skip to content

Conversation

AkashDeepSinghJassal
Copy link
Contributor

@AkashDeepSinghJassal AkashDeepSinghJassal commented Nov 7, 2024

  • Breaking change? (if so, please describe the impact and migration path for existing application instances)

What changes did you make? (Give an overview)
Fix #620
Allow null values in headers when sending messages to the Kafka topic.
There is a missing null check while converting String to byte array, so I have added a null check to avoid converting to bytes if the value String is null.
Also I wrote a test case that replicated the given scenario

         java.lang.NullPointerException: Cannot invoke "String.getBytes()" because "v" is null
	at io.kafbat.ui.serdes.ProducerRecordCreator.lambda$createHeaders$0(ProducerRecordCreator.java:34)
         ...

After fixing the issue, the test case ran successfully.

Is there anything you'd like reviewers to focus on?

How Has This Been Tested? (put an "x" (case-sensitive!) next to an item)

  • No need to
  • Manually (please, describe, if necessary)
  • Unit checks
  • Integration checks
  • Covered by existing automation

Checklist (put an "x" (case-sensitive!) next to all the items, otherwise the build will fail)

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (e.g. ENVIRONMENT VARIABLES)
  • My changes generate no new warnings (e.g. Sonar is happy)
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged

Check out Contributing and Code of Conduct

A picture of a cute animal (not mandatory but encouraged)
output-onlinejpgtools

@AkashDeepSinghJassal AkashDeepSinghJassal requested a review from a team as a code owner November 7, 2024 09:11
@kapybro kapybro bot added status/triage Issues pending maintainers triage status/triage/manual Manual triage in progress status/triage/completed Automatic triage completed and removed status/triage Issues pending maintainers triage labels Nov 7, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Hi AkashDeepSinghJassal! 👋

Welcome, and thank you for opening your first PR in the repo!

Please wait for triaging by our maintainers.

Please take a look at our contributing guide.

@AkashDeepSinghJassal
Copy link
Contributor Author

How to resolve failed checks @Haarolean, please let me know.

Copy link
Member

@germanosin germanosin 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!

@Haarolean Haarolean changed the title Issues/620 BE: Support sending null headers Nov 17, 2024
@Haarolean Haarolean added type/enhancement En enhancement/improvement to an already existing feature scope/backend Related to backend changes area/messages and removed status/triage/manual Manual triage in progress labels Nov 17, 2024
@Haarolean Haarolean merged commit 01aa8ab into kafbat:main Nov 17, 2024
10 of 12 checks passed
@Haarolean
Copy link
Member

@AkashDeepSinghJassal thanks for your first contribution to kafbat ui!

@Haarolean Haarolean changed the title BE: Support sending null headers BE: Messages: Support sending null headers Dec 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/messages scope/backend Related to backend changes status/triage/completed Automatic triage completed type/enhancement En enhancement/improvement to an already existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BE: Support sending null headers
3 participants