VcsDescriptor[] () { Collection<VcsEP> eps; synchronized (myLock) { eps = new ArrayList<>(myExtensions.values()); } List<VcsDescriptor> result = ContainerUtil.sorted(ContainerUtil.map(eps, ep -> ep.createDescriptor()), Comparator.comparing(VcsDescriptor::getName, String::compareTo)); return result.toArray(new VcsDescriptor[0]); }