in hadoop-api-shim/src/main/java/org/apache/hadoop/fs/shim/impl/Preconditions.java [282:296]
public static void checkState(
final boolean expression,
final String errorMsg,
Object... errorMsgArgs) {
if (!expression) {
String msg;
try {
msg = String.format(errorMsg, errorMsgArgs);
} catch (Exception e) {
LOG.debug("Error formatting message", e);
msg = CHECK_STATE_EX_MESSAGE;
}
throw new IllegalStateException(msg);
}
}