List<FS> () { ApplicationManager.getApplication().assertIsNonDispatchThread(); final Artifact[] versions; if (myGroupId != null) { versions = LibrariesDownloadAssistant.getVersions(myGroupId, myLocalUrls); } else { versions = LibrariesDownloadAssistant.getVersions(myLocalUrls); } final List<FS> result = new ArrayList<>(); for (Artifact version : versions) { final ArtifactItem[] items = version.getItems(); final List<F> files = new ArrayList<>(); for (ArtifactItem item : items) { String url = item.getUrl(); final String prefix = version.getUrlPrefix(); if (url == null) { if (prefix != null) { url = prefix + item.getName(); } } else { url = prependPrefix(url, prefix); } assert url != null; files.add(createFileDescription(item, url, prefix)); } result.add(createVersion(version, files)); } result.sort(VERSIONS_COMPARATOR); return result; }