/** * {@inheritDoc} */ @Override public Enumeration<URL> findResources(final String resourceName) throws IOException { // TODO this is not right // first get the resources from the parent classloaders Enumeration<?> parentResources = super.findResources(resourceName); // get the classes from my urls Enumeration<?> myResources = (Enumeration<?>) AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { return MonoParentJarFileClassLoader.this.resourceFinder.findResources(resourceName); } }, this.acc); // join the two together return new UnionEnumeration(parentResources, myResources); }
/** * {@inheritDoc} */ @Override public Enumeration<URL> findResources(final String resourceName) throws IOException { // TODO this is not right // first get the resources from the parent classloaders Enumeration<?> parentResources = super.findResources(resourceName); // get the classes from my urls Enumeration<?> myResources = (Enumeration<?>) AccessController.doPrivileged(new PrivilegedAction<Object>() { @Override public Object run() { return MonoParentJarFileClassLoader.this.resourceFinder.findResources(resourceName); } }, this.acc); // join the two together return new UnionEnumeration(parentResources, myResources); }
List myResources = Collections.list(super.findResources(name)); resources.addAll(myResources); List myResources = Collections.list(super.findResources(name)); resources.addAll(myResources);