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:
Jason Tedor 2016-09-06 10:25:22 -04:00 committed by GitHub
parent c56cd46162
commit 6df70444a3
2 changed files with 0 additions and 9 deletions

View File

@ -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

View File

@ -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")};