in hadoop-api-shim/src/main/java/org/apache/hadoop/fs/shim/impl/Preconditions.java [224:239]
public static void checkArgument(
final boolean expression,
final Supplier<String> msgSupplier) {
if (!expression) {
String msg;
try {
// note that we can get NPE evaluating the message itself;
// but we do not want this to override the actual NPE.
msg = msgSupplier.get();
} catch (Exception e) {
LOG.debug("Error formatting message", e);
msg = CHECK_ARGUMENT_EX_MESSAGE;
}
throw new IllegalArgumentException(msg);
}
}