public ResourceFinder()

in xbean-finder/src/main/java/org/apache/xbean/finder/ResourceFinder.java [67:92]


    public ResourceFinder(String path, ClassLoader classLoader, URL... urls) {
        if (path == null){
            path = "";
        } else if (path.length() > 0 && !path.endsWith("/")) {
            path += "/";
        }
        this.path = path;

        if (classLoader == null) {
            classLoader = Thread.currentThread().getContextClassLoader();
        }
        this.classLoader = classLoader;

        for (int i = 0; urls != null && i < urls.length; i++) {
            URL url = urls[i];
            if (url == null || "jar".equals(url.getProtocol()) || isDirectory(url)) { // test directory last since it is the longer in time
                continue;
            }
            try {
                urls[i] = new URL("jar", "", -1, url.toString() + "!/");
            } catch (MalformedURLException e) {
                // no-op
            }
        }
        this.urls = (urls == null || urls.length == 0)? null : urls;
    }