Include duplicate jar when jarhell check fails
When the jarhell check fails due to a duplicate jar on the classpath, the exception message includes the full classpath but not the duplicated jar. For a long classpath, this can make it difficult to find the jar that is duplicated. This commit changes the exception message to include the duplicated jar. Relates #24953
This commit is contained in:
parent
8999104b14
commit
57b4002357
|
@ -140,7 +140,7 @@ public class JarHell {
|
|||
URL url = PathUtils.get(element).toUri().toURL();
|
||||
if (urlElements.add(url) == false) {
|
||||
throw new IllegalStateException("jar hell!" + System.lineSeparator() +
|
||||
"duplicate jar on classpath: " + classPath);
|
||||
"duplicate jar [" + element + "] on classpath: " + classPath);
|
||||
}
|
||||
} catch (MalformedURLException e) {
|
||||
// should not happen, as we use the filesystem API
|
||||
|
|
Loading…
Reference in New Issue