Remove Log4j 1 jar hell exemption
When Elasticsearch depended on Log4j 1, there was jar hell from the log4j and the apache-log4j-extras jar. As these dependencies are gone, the jar hell exemption for Log4j 1 can be removed. Relates #20336
This commit is contained in:
parent
c56cd46162
commit
6df70444a3
|
@ -271,9 +271,6 @@ public class JarHell {
|
||||||
"class: " + clazz + System.lineSeparator() +
|
"class: " + clazz + System.lineSeparator() +
|
||||||
"exists multiple times in jar: " + jarpath + " !!!!!!!!!");
|
"exists multiple times in jar: " + jarpath + " !!!!!!!!!");
|
||||||
} else {
|
} else {
|
||||||
if (clazz.startsWith("org.apache.log4j")) {
|
|
||||||
return; // go figure, jar hell for what should be System.out.println...
|
|
||||||
}
|
|
||||||
if (clazz.startsWith("org.apache.logging.log4j.core.impl.ThrowableProxy")) {
|
if (clazz.startsWith("org.apache.logging.log4j.core.impl.ThrowableProxy")) {
|
||||||
/*
|
/*
|
||||||
* deliberate to hack around a bug in Log4j
|
* deliberate to hack around a bug in Log4j
|
||||||
|
|
|
@ -111,12 +111,6 @@ public class JarHellTests extends ESTestCase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testLog4jLeniency() throws Exception {
|
|
||||||
Path dir = createTempDir();
|
|
||||||
URL[] jars = {makeJar(dir, "foo.jar", null, "org/apache/log4j/DuplicateClass.class"), makeJar(dir, "bar.jar", null, "org/apache/log4j/DuplicateClass.class")};
|
|
||||||
JarHell.checkJarHell(jars);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testLog4jThrowableProxyLeniency() throws Exception {
|
public void testLog4jThrowableProxyLeniency() throws Exception {
|
||||||
Path dir = createTempDir();
|
Path dir = createTempDir();
|
||||||
URL[] jars = {makeJar(dir, "foo.jar", null, "org.apache.logging.log4j.core.impl.ThrowableProxy.class"), makeJar(dir, "bar.jar", null, "org.apache.logging.log4j.core.impl.ThrowableProxy.class")};
|
URL[] jars = {makeJar(dir, "foo.jar", null, "org.apache.logging.log4j.core.impl.ThrowableProxy.class"), makeJar(dir, "bar.jar", null, "org.apache.logging.log4j.core.impl.ThrowableProxy.class")};
|
||||||
|
|
Loading…
Reference in New Issue