rdblue commented on a change in pull request #888: Use Objects.requireNonNull
to check parameter is or not null
URL: https://github.com/apache/incubator-iceberg/pull/888#discussion_r402660331
##########
File path: api/src/main/java/org/apache/iceberg/expressions/Expressions.java
##########
@@ -35,8 +37,8 @@ private Expressions() {
}
public static Expression and(Expression left, Expression right) {
- Preconditions.checkNotNull(left, "Left expression cannot be null.");
- Preconditions.checkNotNull(right, "Right expression cannot be null.");
+ requireNonNull(left, "Left expression cannot be null.");
+ requireNonNull(right, "Right expression cannot be null.");
Review comment:
There's no need to change the existing check, since it already throws NPE.
While it may be nice to use Java-standard methods, I don't think it is worth
going through and converting all of these cases. That's unnecessary code churn.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]