@Override
    public Enumeration<URL> findResources(final String resourceName) throws IOException {
        // super.findResources(resourceName) finds both from the delegation parent ClassLoader and non-self-contained JARs.
        final Enumeration<URL> resourceUrlsFromSuper = super.findResources(resourceName);

        final Vector<URL> resourceUrls = new Vector<URL>();
        while (resourceUrlsFromSuper.hasMoreElements()) {
            resourceUrls.add(resourceUrlsFromSuper.nextElement());
        }

        if (this.selfContainedJarCategory != null) {
            // Even if some resources are found from the delegation parent class loader, it looks into self-contained JAR files.
            final Collection<Resource> resources;
            try {
                resources = SelfContainedJarFiles.getMultipleResources(resourceName, this.selfContainedJarCategory);
            } catch (final IllegalArgumentException ex) {
                Holder.logger.info("Unexpected self-contained JAR category \"{}\" is requested for resource \"{}\".",
                                   this.selfContainedJarCategory, resourceName);
                Holder.logger.debug("[NOT AN IMMEDIATE ERROR] Unexpected self-contained JAR category.", ex);
                return resourceUrls.elements();
            }

            final Collection<URL> resourceUrlsFromSelfContainedJarFiles;
            try {
                resourceUrlsFromSelfContainedJarFiles =
                        AccessController.doPrivileged(new PrivilegedExceptionAction<Collection<URL>>() {
                                @Override
                                public Collection<URL> run() throws IOException {
                                    final ArrayList<URL> urls = new ArrayList<>();
                                    for (final Resource resource : resources) {
                                        urls.add(resource.buildJarEmbeddedUrl());
                                    }
                                    return urls;
                                }
                            },
                            accessControlContext);
            } catch (final PrivilegedActionException ignored) {
                // Passing through intentionally.
                return resourceUrls.elements();
            }

            resourceUrls.addAll(resourceUrlsFromSelfContainedJarFiles);
        }

        return resourceUrls.elements();
    }
Finds resources recognized as the given name.

<p>Note that {@link java.net.URLClassLoader#findResources} is public while {@link java.lang.ClassLoader#findResources}
is protected.
embulk-core/src/main/java/org/embulk/cli/SelfContainedJarAwareURLClassLoader.java