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

Add null check in DelegatingBlockReader#toString() and unit tests #18677

Open
wants to merge 1 commit into
base: master-2.x
Choose a base branch
from

Conversation

LSukie
Copy link

@LSukie LSukie commented Aug 29, 2024

What changes are proposed in this PR?

This PR adds a null check in the DelegatingBlockReader#toString() method to handle cases where the underlying BlockReader is null. This prevents potential NullPointerException during the toString() call.

Additionally, unit tests were added to verify this new behavior.

Why are the changes needed?

The change ensures that the DelegatingBlockReader can gracefully handle cases where the underlying BlockReader is null, which improves robustness.

Does this PR introduce any user-facing changes?

No.

How was this patch tested?

Unit tests have been added and verified with the current testing framework.

@alluxio-bot
Copy link
Contributor

Thank you for your pull request.
In order for us to evaluate and accept your PR, we ask that you sign a contribution license agreement (CLA).
It's all electronic and will take just a few minutes. Please download CLA form here, sign, and e-mail back to [email protected]

@LSukie
Copy link
Author

LSukie commented Sep 3, 2024

alluxio-bot, check this please.

@alluxio-bot
Copy link
Contributor

Automated checks report:

  • PR title follows the conventions: PASS
  • Commits associated with Github account: PASS

All checks passed!

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