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

HDDS-11960. Improve some Objects.requireNonNull() messages #7601

Closed
wants to merge 1 commit into from

Conversation

jianghuazhu
Copy link
Contributor

@jianghuazhu jianghuazhu commented Dec 19, 2024

What changes were proposed in this pull request?

Improve some Objects.requireNonNull() messages.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-11960

How was this patch tested?

You need to ensure that all unit tests pass.
ci: https://github.com/jianghuazhu/ozone/actions/runs/12396397130

Copy link
Contributor

@adoroszlai adoroszlai left a comment

Choose a reason for hiding this comment

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

Thanks @jianghuazhu for the patch.

However, I think having a name in the message is enough, exception clearly shows the problem:

jshell> Objects.requireNonNull(null, "transactionInfo")
|  Exception java.lang.NullPointerException: transactionInfo
|        at Objects.requireNonNull (Objects.java:248)

@jianghuazhu
Copy link
Contributor Author

Thanks @adoroszlai .

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