} catch (final IllegalArgumentException iae) { // not a directory...
return;
}
while (resources.hasNext()) {
final Resource resource = resources.next();
if (FileResource.class.isInstance(resource)) {
final FileResource fr = FileResource.class.cast(resource);
try {
final Field field = FileResource.class.getDeclaredField("file");
field.setAccessible(true);
list.add(File.class.cast(field.get(fr)).toURI().toURL());
} catch (final Exception e) {
// no-op
}
} else if (ZipResource.class.isInstance(resource)) {
list.add(loader.getResource(resource.getPath()));
} else {
LOGGER.warning("Resource " + resource + " ignored (unknown type).");
}
}
}