}
Iterator/* <IvyClasspathContainer> */itContainers = containers.iterator();
while (error == null && itContainers.hasNext()) {
IvyClasspathContainerImpl ivycp = (IvyClasspathContainerImpl) itContainers.next();
IvyClasspathContainerConfiguration cpc = ivycp.getConf();
// first check that this is not the one we are editing
if (oldIvyFile != null && cpc.getIvyXmlPath().equals(oldIvyFile) && oldConfs != null
&& oldConfs.size() == cpc.getConfs().size()
&& oldConfs.containsAll(cpc.getConfs())) {
continue;
}
if (cpc.getIvyXmlPath().equals(ivyFilePath)) {
if (selectedConfigurations.isEmpty() || selectedConfigurations.contains("*")
|| cpc.getConfs().isEmpty() || cpc.getConfs().contains("*")) {
error = "A container already exists for the selected conf of "
+ "the module descriptor";
} else {
ArrayList list = new ArrayList(cpc.getConfs());
list.retainAll(selectedConfigurations);
if (!list.isEmpty()) {
error = "A container already exists for the selected conf of "
+ "the module descriptor";
}