jerryshao commented on code in PR #6861:
URL: https://github.com/apache/gravitino/pull/6861#discussion_r2044063925
##########
core/src/main/java/org/apache/gravitino/listener/api/info/Either.java:
##########
@@ -40,6 +41,7 @@ public final class Either<L, R> {
* @param <R> Right type
*/
public static <L, R> Either<L, R> left(L value) {
+ Preconditions.checkNotNull(value, "Left value cannot be null");
Review Comment:
Can we use checkArgument instead of checkNotNull, checkNotNull will throw an
NPE, I think we should not throw NPE delibrately.
##########
core/src/main/java/org/apache/gravitino/listener/api/info/Either.java:
##########
@@ -40,6 +41,7 @@ public final class Either<L, R> {
* @param <R> Right type
*/
public static <L, R> Either<L, R> left(L value) {
+ Preconditions.checkNotNull(value, "Left value cannot be null");
Review Comment:
Can we use checkArgument instead of checkNotNull, checkNotNull will throw an
NPE, I think we should not throw NPE deliberately.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]