EA-37993 - NPE: RepositoryAttachDialog.process

This commit is contained in:
Gregory.Shrago
2012-08-07 17:16:52 +04:00
parent 720bbc1201
commit 3ab5f71df2
@@ -238,8 +238,9 @@ public class RepositoryAttachDialog extends DialogWrapper {
final int prevSize = myCoordinates.size();
for (Pair<MavenArtifactInfo, MavenRepositoryInfo> each : artifacts) {
myCoordinates.put(each.first.getGroupId() + ":" + each.first.getArtifactId() + ":" + each.first.getVersion(), each);
if (each.second != null && !myRepositories.containsKey(each.second.getUrl())) {
myRepositories.put(each.second.getUrl(), each.second);
String url = each.second != null? each.second.getUrl() : null;
if (StringUtil.isNotEmpty(url) && !myRepositories.containsKey(url)) {
myRepositories.put(url, each.second);
}
}
String title = getTitle();