    public static Set<URL> findUrls(final ClassLoader classLoader) throws IOException {
        if (classLoader == null || classLoader.getClass().getName().equals("sun.misc.Launcher$ExtClassLoader")) {
            return Collections.emptySet();
        }
        final Set<URL> urls;
        if (URLClassLoader.class.isInstance(classLoader) && !DONT_USE_GET_URLS) {
            urls =  new HashSet<URL>();
            if (!isSurefire(classLoader)) {
                urls.addAll(Arrays.asList(URLClassLoader.class.cast(classLoader).getURLs()));
                urls.addAll(findUrls(classLoader.getParent()));
            } else { 
                urls.addAll(fromClassPath());
            }
        } else {
            urls = findUrlFromResources(classLoader);
        }
        return urls;
    }

    public static Set<URL> findUrls(final ClassLoader classLoader) throws IOException {
        if (classLoader == null || (SYSTEM.getParent() != null && classLoader == SYSTEM.getParent())) {
            return Collections.emptySet();
        }
        final Set<URL> urls;
        if (URLClassLoader.class.isInstance(classLoader) && !DONT_USE_GET_URLS) {
            urls =  new HashSet<URL>();
            if (!isSurefire(classLoader)) {
                urls.addAll(Arrays.asList(URLClassLoader.class.cast(classLoader).getURLs()));
                urls.addAll(findUrls(classLoader.getParent()));
            } else { 
                urls.addAll(fromClassPath());
            }
        } else {
            urls = findUrlFromResources(classLoader);
        }
        return urls;
    }
