Browse Source

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
Jason Tedor 9 years ago
parent
commit
6df70444a3

+ 0 - 3
core/src/main/java/org/elasticsearch/bootstrap/JarHell.java

@@ -271,9 +271,6 @@ public class JarHell {
                         "class: " + clazz + System.lineSeparator() +
                         "exists multiple times in jar: " + jarpath + " !!!!!!!!!");
             } 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")) {
                     /*
                      * deliberate to hack around a bug in Log4j

+ 0 - 6
core/src/test/java/org/elasticsearch/bootstrap/JarHellTests.java

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