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 2022/06/02 09:10:16 UTC

[GitHub] [iceberg] nastra commented on pull request #4617: Style: Add checkstyle rule to prevent using Objects.requireNonNull

nastra commented on PR #4617:
URL: https://github.com/apache/iceberg/pull/4617#issuecomment-1144632025

   just curious, why wouldn't we want to allow something like `if (Objects.nonNull(x))`? The checkstyle message suggests to use `Preconditions.checkNotNull` instead, but that's not really the same. I can see why we'd want to use `Preconditions.checkNotNull` rather than `Objects.requireNonNull` but not why we'd prevent usage of `Objects.nonNull`, since it's just returning a `boolean`


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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