* @param url The url to be found.
* @return The <code>ArtifactData</code> object that has this <code>url</code>, or <code>null</code> if none can be
* found.
*/
private ArtifactData getArtifactData(URL url, Collection<ArtifactData> data) {
ArtifactData bundle = null;
URI uri = null;
try {
uri = url.toURI();
}
catch (URISyntaxException e) {
m_log.log(LogService.LOG_ERROR, "Could not convert URL " + url + " to a URI");
return null;
}
Iterator<ArtifactData> it = data.iterator();
while (it.hasNext()) {
bundle = it.next();
try {
if (uri.equals(bundle.getUrl().toURI())) {
return bundle;
}
}
catch (URISyntaxException e) {
m_log.log(LogService.LOG_ERROR, "Could not convert bundle URL for " + bundle.getFilename() + " to a URI");
}
}
return null;
}