[ 
https://issues.apache.org/jira/browse/HDDS-14057?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18042112#comment-18042112
 ] 

Ivan Andika edited comment on HDDS-14057 at 12/2/25 9:13 AM:
-------------------------------------------------------------

[~szetszwo] Thanks for raising this. Could you help explain the preference of 
Objects.requireNotNull instead of Preconditions.checkNotNull since from the 
first glance they achieves the same thing? One reason I can think is to reduce 
the Guava dependency, but Ozone is currently depends on Guava in other 
instances.


was (Author: JIRAUSER298977):
[~szetszwo] Thanks for raising this. Could you explain the preference of 
Objects.requireNotNull instead of Preconditions.checkNotNull since from the 
first glance they achieves the same thing? One reason I can think is to reduce 
the Guava dependency, but Ozone is currently depends on Guava in other 
instances.

> Do not use Guava Preconditions.checkNotNull(..)
> -----------------------------------------------
>
>                 Key: HDDS-14057
>                 URL: https://issues.apache.org/jira/browse/HDDS-14057
>             Project: Apache Ozone
>          Issue Type: Improvement
>            Reporter: Tsz-wo Sze
>            Priority: Major
>
> Currently, there are 496 occurrences of Guava Preconditions.checkNotNull(..). 
>  It is better to use Java Objects.requireNonNull(..) instead.  We should file 
> subtasks to fix them in order to avoid a huge code change.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to