You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2020/04/02 23:54:21 UTC

[GitHub] [incubator-iceberg] rdblue commented on issue #888: Use Objects.requireNonNull to check parameter is or not null

rdblue commented on issue #888: Use Objects.requireNonNull to check parameter is or not null
URL: https://github.com/apache/incubator-iceberg/pull/888#issuecomment-608153017
 
 
   Hi @leoluan2009, thanks for taking the time to look at this.
   
   I reviewed it and I don't think this is something that we should merge. Some of the cases were correct, as I pointed out. But most of the changes in this PR are simply converting a `Preconditions` check over to an `Objects` check. Other than unnecessary code churn, this actually makes the code slower because `Preconditions` uses a format string and object references. This PR uses string concatenation instead and the result is that error messages are produced every time a method runs, not just if the check fails.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org