RepositoryLibraryDescription (@Nullable final String groupId, @Nullable final String artifactId, String bindToRemoteRepository, boolean sha256sumCheckEnabled) { if (ourStaticallyDefinedLibraries == null) { final HashMap<String, RepositoryLibraryDescription> map = new HashMap<>(); for (RepositoryLibraryDefinition def : RepositoryLibraryDefinition.EP_NAME.getExtensionList()) { final String id = def.groupId + ":" + def.artifactId; map.put(id, new RepositoryLibraryDescription(def.groupId, def.artifactId, def.name)); } ourStaticallyDefinedLibraries = Collections.unmodifiableMap(Collections.synchronizedMap(map)); } @NlsSafe final String id = groupId == null && artifactId == null ? CodeInsightBundle.message("unknown.node.text") : groupId + ":" + artifactId; final RepositoryLibraryDescription description = ourStaticallyDefinedLibraries.get(id); return description != null? description : new RepositoryLibraryDescription(groupId, artifactId, id, bindToRemoteRepository, sha256sumCheckEnabled); }