what-the-bank/sources/com/google/firebase/firestore/util/Assert.java

32 lines
940 B
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package com.google.firebase.firestore.util;
/* loaded from: classes2.dex */
public class Assert {
public static void hardAssert(boolean z, String str, Object... objArr) {
if (!z) {
throw fail(str, objArr);
}
}
public static <T> T hardAssertNonNull(T t, String str, Object... objArr) {
if (t != null) {
return t;
}
throw fail(str, objArr);
}
public static AssertionError fail(String str, Object... objArr) {
throw new AssertionError(format(str, objArr));
}
public static AssertionError fail(Throwable th, String str, Object... objArr) {
throw ApiUtil.newAssertionError(format(str, objArr), th);
}
private static String format(String str, Object... objArr) {
StringBuilder sb = new StringBuilder("INTERNAL ASSERTION FAILED: ");
sb.append(String.format(str, objArr));
return sb.toString();
}
}