Alluxio / alluxio

Alluxio, data orchestration for analytics and machine learning in the cloud
https://www.alluxio.io
Apache License 2.0
6.87k stars 2.94k forks source link

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

Open LSukie opened 2 months ago

LSukie commented 2 months ago

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 commented 2 months ago

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 cla@alluxio.org

LSukie commented 2 months ago

alluxio-bot, check this please.

alluxio-bot commented 2 months ago

Automated checks report:

All checks passed!