loader = loader.getParent();
if(loader == null)
throw new BuildException("Unable to find a URLClassLoader to which path may be added");
}
FileUtils fu = FileUtils.newFileUtils();
for(Iterator iterator = paths.iterator(); iterator.hasNext();)
{
Path path = (Path)iterator.next();
String pathElements[] = path.list();
int i = 0;
while(i < pathElements.length)
{
String pathElement = pathElements[i];
URL url;
try {
url = new URL(fu.toURI(pathElement));
} catch (MalformedURLException e) {
throw new BuildException("Unable to load class path at path="+pathElement, e);
}
List urls = Arrays.asList(((URLClassLoader)loader).getURLs());
if (!urls.contains(url)) {