Fix JarHell check to properly convert URL to Path so it can be compared

to java.home
This commit is contained in:
Ryan Ernst 2015-07-07 19:40:43 -07:00
parent ba96dc3616
commit bab1323d1e
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ public class JarHell {
final Map<String,URL> clazzes = new HashMap<>(32768);
Set<String> seenJars = new HashSet<>();
for (final URL url : urls) {
String path = URLDecoder.decode(url.getPath(), "UTF-8");
String path = PathUtils.get(url.toURI()).toString();
// exclude system resources
if (path.startsWith(javaHome)) {
logger.debug("excluding system resource: {}", path);