for (final String resourcePath : resourcePaths) {
if (resourcePath.endsWith("/")) {
scan(resourcePath, cfl);
} else if (resourcePath.endsWith(".jar")) {
try {
new Closing(sc.getResourceAsStream(resourcePath)).f(new Closing.Closure() {
public void f(final InputStream in) throws IOException {
JarFileScanner.scan(in, "", cfl);
}
});
} catch (IOException ex) {
throw new ScannerException("IO error scanning jar " + resourcePath, ex);
}
} else if (cfl.onAccept(resourcePath)) {
try {
new Closing(sc.getResourceAsStream(resourcePath)).f(new Closing.Closure() {
public void f(final InputStream in) throws IOException {
cfl.onProcess(resourcePath, in);
}
});
} catch (IOException ex) {