incorrectly converted AntClassLoader.loadResource to a Java 5 for-loop.
@@ -744,13 +744,14 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
private InputStream loadResource(String name) {
// we need to search the components of the path to see if we can
// find the class we want.
- InputStream stream = null;
-
for (File pathComponent : pathComponents) {
- stream = getResourceStream(pathComponent, name);
- }
+ InputStream stream = getResourceStream(pathComponent, name);
+ if (stream != null) {
return stream;
}
+ }
+ return null;
+ }
/**
* Finds a system resource (which should be loaded from the parent
