CAG v5.7.4版本的 MD5 值为:bc57ead76a7a30559f0708e9d60d749f
以下内容为反编译后的 c.java 源代码,内容仅作参考
package d.i;
import d.i.e.d;
import d.i.e.e;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.LinkedBlockingQueue;
import org.slf4j.helpers.NOPLogger;
public final class c {
public static volatile int a;
public static d b = new d();
public static d.i.e.b c = new d.i.e.b();
public static final String[] f7497d;
public static String f7498e;
static {
String str = null;
try {
str = System.getProperty("slf4j.detectLoggerNameMismatch");
} catch (SecurityException unused) {
}
if (str != null) {
str.equalsIgnoreCase("true");
}
f7497d = new String[]{"1.6", "1.7"};
f7498e = "org/slf4j/impl/StaticLoggerBinder.class";
}
public static Set<URL> a() {
Enumeration<URL> resources;
LinkedHashSet linkedHashSet = new LinkedHashSet();
try {
ClassLoader classLoader = c.class.getClassLoader();
if (classLoader == null) {
resources = ClassLoader.getSystemResources(f7498e);
} else {
resources = classLoader.getResources(f7498e);
}
while (resources.hasMoreElements()) {
linkedHashSet.add(resources.nextElement());
}
} catch (IOException e2) {
e.b("Error getting resources from path", e2);
}
return linkedHashSet;
}
public static void b() {
synchronized (b) {
d dVar = b;
dVar.a = true;
Objects.requireNonNull(dVar);
Iterator it = new ArrayList(dVar.b.values()).iterator();
while (it.hasNext()) {
d.i.e.c cVar = (d.i.e.c) it.next();
cVar.f7503j = c(cVar.f7502i);
}
}
}
public static b c(String str) {
a aVar;
if (a == 0) {
synchronized (c.class) {
if (a == 0) {
a = 1;
e();
}
}
}
int i2 = a;
if (i2 == 1) {
aVar = b;
} else if (i2 == 2) {
throw new IllegalStateException("org.slf4j.LoggerFactory could not be successfully initialized. See also http://www.slf4j.org/codes.html#unsuccessfulInit");
} else {
if (i2 == 3) {
aVar = d.i.f.b.b.a;
} else if (i2 == 4) {
aVar = c;
} else {
throw new IllegalStateException("Unreachable code");
}
}
return aVar.a(str);
}
public static boolean d() {
String str;
try {
str = System.getProperty("java.vendor.url");
} catch (SecurityException unused) {
str = null;
}
if (str == null) {
return false;
}
return str.toLowerCase().contains("android");
}
public static final void e() {
Set<URL> set = null;
try {
if (!d()) {
set = a();
h(set);
}
d.i.f.b bVar = d.i.f.b.b;
a = 3;
g(set);
b();
f();
d dVar = b;
dVar.b.clear();
dVar.c.clear();
} catch (Exception e2) {
a = 2;
e.b("Failed to instantiate SLF4J LoggerFactory", e2);
throw new IllegalStateException("Unexpected initialization failure", e2);
} catch (NoClassDefFoundError e3) {
String message = e3.getMessage();
if (message != null && (message.contains("org/slf4j/impl/StaticLoggerBinder") || message.contains("org.slf4j.impl.StaticLoggerBinder"))) {
a = 4;
e.a("Failed to load class \"org.slf4j.impl.StaticLoggerBinder\".");
e.a("Defaulting to no-operation (NOP) logger implementation");
e.a("See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.");
} else {
a = 2;
e.b("Failed to instantiate SLF4J LoggerFactory", e3);
throw e3;
}
} catch (NoSuchMethodError e4) {
String message2 = e4.getMessage();
if (message2 != null && message2.contains("org.slf4j.impl.StaticLoggerBinder.getSingleton()")) {
a = 2;
e.a("slf4j-api 1.6.x (or later) is incompatible with this binding.");
e.a("Your binding is version 1.5.5 or earlier.");
e.a("Upgrade your binding to version 1.6.x.");
}
throw e4;
}
if (a == 3) {
try {
String str = d.i.f.b.c;
boolean z = false;
for (String str2 : f7497d) {
if (str.startsWith(str2)) {
z = true;
}
}
if (z) {
return;
}
e.a("The requested version " + str + " by your slf4j binding is not compatible with " + Arrays.asList(f7497d).toString());
e.a("See http://www.slf4j.org/codes.html#version_mismatch for further details.");
} catch (NoSuchFieldError unused) {
} catch (Throwable th) {
e.b("Unexpected problem occured during version sanity check", th);
}
}
}
public static void f() {
LinkedBlockingQueue<d.i.d.c> linkedBlockingQueue = b.c;
int size = linkedBlockingQueue.size();
ArrayList arrayList = new ArrayList(128);
int i2 = 0;
while (linkedBlockingQueue.drainTo(arrayList, 128) != 0) {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
d.i.d.c cVar = (d.i.d.c) it.next();
if (cVar != null) {
d.i.e.c cVar2 = cVar.a;
String str = cVar2.f7502i;
if (!(cVar2.f7503j == null)) {
if (!(cVar2.f7503j instanceof NOPLogger)) {
if (cVar2.b()) {
if (cVar2.b()) {
try {
cVar2.f7505l.invoke(cVar2.f7503j, cVar);
} catch (IllegalAccessException | IllegalArgumentException | InvocationTargetException unused) {
}
}
} else {
e.a(str);
}
}
} else {
throw new IllegalStateException("Delegate logger cannot be null at this state.");
}
}
int i3 = i2 + 1;
if (i2 == 0) {
if (cVar.a.b()) {
e.a("A number (" + size + ") of logging calls during the initialization phase have been intercepted and are");
e.a("now being replayed. These are subject to the filtering rules of the underlying logging system.");
e.a("See also http://www.slf4j.org/codes.html#replay");
} else if (!(cVar.a.f7503j instanceof NOPLogger)) {
e.a("The following set of substitute loggers may have been accessed");
e.a("during the initialization phase. Logging calls during this");
e.a("phase were not honored. However, subsequent logging calls to these");
e.a("loggers will work as normally expected.");
e.a("See also http://www.slf4j.org/codes.html#substituteLogger");
}
}
i2 = i3;
}
arrayList.clear();
}
}
public static void g(Set<URL> set) {
if (set != null) {
if (set.size() > 1) {
StringBuilder J = i.a.b.a.a.J("Actual binding is of type [");
Objects.requireNonNull(d.i.f.b.b);
J.append(d.i.f.b.f7509d);
J.append("]");
e.a(J.toString());
}
}
}
public static void h(Set<URL> set) {
if (set.size() > 1) {
e.a("Class path contains multiple SLF4J bindings.");
Iterator<URL> it = set.iterator();
while (it.hasNext()) {
e.a("Found binding in [" + it.next() + "]");
}
e.a("See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.");
}
}
}