Remove Joda-Time jar hell exemption
Previously we had an exemption for Joda-Time BaseDateTime because we forked this class to remove the usage of a volatile field. This hack is no longer in place, so the exemption is no longer necessary. This commit removes that exemption. Relates #20328
This commit is contained in:
parent
3526525a02
commit
0003196749
|
@ -168,7 +168,7 @@ public class JarHell {
|
||||||
if (path.toString().endsWith(".jar")) {
|
if (path.toString().endsWith(".jar")) {
|
||||||
if (!seenJars.add(path)) {
|
if (!seenJars.add(path)) {
|
||||||
logger.debug("excluding duplicate classpath element: {}", path);
|
logger.debug("excluding duplicate classpath element: {}", path);
|
||||||
continue; // we can't fail because of sheistiness with joda-time
|
continue;
|
||||||
}
|
}
|
||||||
logger.debug("examining jar: {}", path);
|
logger.debug("examining jar: {}", path);
|
||||||
try (JarFile file = new JarFile(path.toString())) {
|
try (JarFile file = new JarFile(path.toString())) {
|
||||||
|
@ -274,9 +274,6 @@ public class JarHell {
|
||||||
if (clazz.startsWith("org.apache.log4j")) {
|
if (clazz.startsWith("org.apache.log4j")) {
|
||||||
return; // go figure, jar hell for what should be System.out.println...
|
return; // go figure, jar hell for what should be System.out.println...
|
||||||
}
|
}
|
||||||
if (clazz.equals("org.joda.time.base.BaseDateTime")) {
|
|
||||||
return; // apparently this is intentional... clean this up
|
|
||||||
}
|
|
||||||
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
|
||||||
|
|
|
@ -117,12 +117,6 @@ public class JarHellTests extends ESTestCase {
|
||||||
JarHell.checkJarHell(jars);
|
JarHell.checkJarHell(jars);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testBaseDateTimeLeniency() throws Exception {
|
|
||||||
Path dir = createTempDir();
|
|
||||||
URL[] jars = {makeJar(dir, "foo.jar", null, "org/joda/time/base/BaseDateTime.class"), makeJar(dir, "bar.jar", null, "org/joda/time/base/BaseDateTime.class")};
|
|
||||||
JarHell.checkJarHell(jars);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void testWithinSingleJar() throws Exception {
|
public void testWithinSingleJar() throws Exception {
|
||||||
// the java api for zip file does not allow creating duplicate entries (good!) so
|
// the java api for zip file does not allow creating duplicate entries (good!) so
|
||||||
// this bogus jar had to be constructed with ant
|
// this bogus jar had to be constructed with ant
|
||||||
|
|
Loading…
Reference in New Issue