tisonkun commented on code in PR #677:
URL: https://github.com/apache/ratis/pull/677#discussion_r917850028
##########
ratis-common/src/main/java/org/apache/ratis/util/Preconditions.java:
##########
@@ -102,6 +102,11 @@ static <T> T assertNotNull(T object, String name) {
+ name + " = " + object + " == null, class = " + object.getClass());
}
+ static <T> T assertNotNull(T object, String format, Object... args) {
Review Comment:
Good to know. I made the decision since `Objects.requireNonNull` throws
`NullPointerException` while these methods throws `IllegalStateException`.
Perhaps Guava's `Precondition.checkArgument` fits better XD
--
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]