discord-jadx/app/src/main/java/d0/z/d/m.java

120 lines
4.2 KiB
Java

package d0.z.d;
import c.d.b.a.a;
import java.util.Arrays;
import kotlin.KotlinNullPointerException;
import kotlin.UninitializedPropertyAccessException;
/* compiled from: Intrinsics */
public class m {
public static String a(String str) {
StackTraceElement stackTraceElement = Thread.currentThread().getStackTrace()[4];
String className = stackTraceElement.getClassName();
String methodName = stackTraceElement.getMethodName();
return "Parameter specified as non-null is null: method " + className + "." + methodName + ", parameter " + str;
}
public static boolean areEqual(Object obj, Object obj2) {
return obj == null ? obj2 == null : obj.equals(obj2);
}
public static <T extends Throwable> T b(T t, String str) {
StackTraceElement[] stackTrace = t.getStackTrace();
int length = stackTrace.length;
int i = -1;
for (int i2 = 0; i2 < length; i2++) {
if (str.equals(stackTrace[i2].getClassName())) {
i = i2;
}
}
t.setStackTrace((StackTraceElement[]) Arrays.copyOfRange(stackTrace, i + 1, length));
return t;
}
public static void checkExpressionValueIsNotNull(Object obj, String str) {
if (obj == null) {
IllegalStateException illegalStateException = new IllegalStateException(a.s(str, " must not be null"));
b(illegalStateException, m.class.getName());
throw illegalStateException;
}
}
public static void checkNotNull(Object obj) {
if (obj == null) {
throwJavaNpe();
}
}
public static void checkNotNullExpressionValue(Object obj, String str) {
if (obj == null) {
NullPointerException nullPointerException = new NullPointerException(a.s(str, " must not be null"));
b(nullPointerException, m.class.getName());
throw nullPointerException;
}
}
public static void checkNotNullParameter(Object obj, String str) {
if (obj == null) {
NullPointerException nullPointerException = new NullPointerException(a(str));
b(nullPointerException, m.class.getName());
throw nullPointerException;
}
}
public static void checkParameterIsNotNull(Object obj, String str) {
if (obj == null) {
IllegalArgumentException illegalArgumentException = new IllegalArgumentException(a(str));
b(illegalArgumentException, m.class.getName());
throw illegalArgumentException;
}
}
public static int compare(int i, int i2) {
if (i < i2) {
return -1;
}
return i == i2 ? 0 : 1;
}
public static void needClassReification() {
throwUndefinedForReified();
}
public static void reifiedOperationMarker(int i, String str) {
throwUndefinedForReified();
}
public static String stringPlus(String str, Object obj) {
return a.r(str, obj);
}
public static void throwJavaNpe() {
NullPointerException nullPointerException = new NullPointerException();
b(nullPointerException, m.class.getName());
throw nullPointerException;
}
public static void throwNpe() {
KotlinNullPointerException kotlinNullPointerException = new KotlinNullPointerException();
b(kotlinNullPointerException, m.class.getName());
throw kotlinNullPointerException;
}
public static void throwUndefinedForReified() {
throwUndefinedForReified("This function has a reified type parameter and thus can only be inlined at compilation time, not called directly.");
}
public static void throwUndefinedForReified(String str) {
throw new UnsupportedOperationException(str);
}
public static void throwUninitializedProperty(String str) {
UninitializedPropertyAccessException uninitializedPropertyAccessException = new UninitializedPropertyAccessException(str);
b(uninitializedPropertyAccessException, m.class.getName());
throw uninitializedPropertyAccessException;
}
public static void throwUninitializedPropertyAccessException(String str) {
throwUninitializedProperty("lateinit property " + str + " has not been initialized");
}
}