discord-jadx/app/src/main/java/d0/x/b.java

113 lines
6.1 KiB
Java

package d0.x;
import d0.g0.w;
import d0.z.d.m;
/* compiled from: PlatformImplementations.kt */
public final class b {
public static final a a;
static {
a aVar;
Object newInstance;
Object newInstance2;
String property = System.getProperty("java.specification.version");
int i = 65542;
if (property != null) {
int indexOf$default = w.indexOf$default((CharSequence) property, '.', 0, false, 6, (Object) null);
if (indexOf$default < 0) {
try {
i = Integer.parseInt(property) * 65536;
} catch (NumberFormatException unused) {
}
} else {
int i2 = indexOf$default + 1;
int indexOf$default2 = w.indexOf$default((CharSequence) property, '.', i2, false, 4, (Object) null);
if (indexOf$default2 < 0) {
indexOf$default2 = property.length();
}
String substring = property.substring(0, indexOf$default);
m.checkNotNullExpressionValue(substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
String substring2 = property.substring(i2, indexOf$default2);
m.checkNotNullExpressionValue(substring2, "(this as java.lang.Strin…ing(startIndex, endIndex)");
i = (Integer.parseInt(substring) * 65536) + Integer.parseInt(substring2);
}
}
if (i >= 65544) {
try {
Object newInstance3 = Class.forName("kotlin.internal.jdk8.JDK8PlatformImplementations").newInstance();
m.checkNotNullExpressionValue(newInstance3, "Class.forName(\"kotlin.in…entations\").newInstance()");
if (newInstance3 != null) {
try {
aVar = (a) newInstance3;
a = aVar;
} catch (ClassCastException e) {
ClassLoader classLoader = newInstance3.getClass().getClassLoader();
ClassLoader classLoader2 = a.class.getClassLoader();
Throwable initCause = new ClassCastException("Instance classloader: " + classLoader + ", base type classloader: " + classLoader2).initCause(e);
m.checkNotNullExpressionValue(initCause, "ClassCastException(\"Inst…baseTypeCL\").initCause(e)");
throw initCause;
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.internal.PlatformImplementations");
}
} catch (ClassNotFoundException unused2) {
try {
newInstance2 = Class.forName("kotlin.internal.JRE8PlatformImplementations").newInstance();
m.checkNotNullExpressionValue(newInstance2, "Class.forName(\"kotlin.in…entations\").newInstance()");
if (newInstance2 != null) {
aVar = (a) newInstance2;
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.internal.PlatformImplementations");
}
} catch (ClassNotFoundException unused3) {
}
} catch (ClassCastException e2) {
ClassLoader classLoader3 = newInstance2.getClass().getClassLoader();
ClassLoader classLoader4 = a.class.getClassLoader();
Throwable initCause2 = new ClassCastException("Instance classloader: " + classLoader3 + ", base type classloader: " + classLoader4).initCause(e2);
m.checkNotNullExpressionValue(initCause2, "ClassCastException(\"Inst…baseTypeCL\").initCause(e)");
throw initCause2;
}
}
if (i >= 65543) {
try {
Object newInstance4 = Class.forName("d0.x.d.a").newInstance();
m.checkNotNullExpressionValue(newInstance4, "Class.forName(\"kotlin.in…entations\").newInstance()");
if (newInstance4 != null) {
try {
aVar = (a) newInstance4;
a = aVar;
} catch (ClassCastException e3) {
ClassLoader classLoader5 = newInstance4.getClass().getClassLoader();
ClassLoader classLoader6 = a.class.getClassLoader();
Throwable initCause3 = new ClassCastException("Instance classloader: " + classLoader5 + ", base type classloader: " + classLoader6).initCause(e3);
m.checkNotNullExpressionValue(initCause3, "ClassCastException(\"Inst…baseTypeCL\").initCause(e)");
throw initCause3;
}
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.internal.PlatformImplementations");
}
} catch (ClassNotFoundException unused4) {
try {
newInstance = Class.forName("kotlin.internal.JRE7PlatformImplementations").newInstance();
m.checkNotNullExpressionValue(newInstance, "Class.forName(\"kotlin.in…entations\").newInstance()");
if (newInstance != null) {
aVar = (a) newInstance;
} else {
throw new NullPointerException("null cannot be cast to non-null type kotlin.internal.PlatformImplementations");
}
} catch (ClassNotFoundException unused5) {
}
} catch (ClassCastException e4) {
ClassLoader classLoader7 = newInstance.getClass().getClassLoader();
ClassLoader classLoader8 = a.class.getClassLoader();
Throwable initCause4 = new ClassCastException("Instance classloader: " + classLoader7 + ", base type classloader: " + classLoader8).initCause(e4);
m.checkNotNullExpressionValue(initCause4, "ClassCastException(\"Inst…baseTypeCL\").initCause(e)");
throw initCause4;
}
}
aVar = new a();
a = aVar;
}
}