@Test void list(TestInfo testInfo) { final String name = TestUtil.normalizedDisplayName(testInfo); final int numNames = 10; for (int i = 0; i < numNames; i++) { m.create(name + i, Author.SYSTEM); } final List<String> names = new ArrayList<>(m.list().keySet()); for (int i = 0; i < numNames - 1; i++) { if (names.get(i).compareTo(names.get(i + 1)) > 0) { fail("names is not in ascending order"); } } }
@Override public Map<String, Repository> list() { ensureOpen(); final int estimatedSize = repos.size(); final String[] names = repos.keySet().toArray(new String[estimatedSize]); Arrays.sort(names); final Map<String, Repository> ret = new LinkedHashMap<>(names.length); for (String name : names) { final Repository repo = repos.get(name); if (repo != null) { ret.put(name, repo); } } return Collections.unmodifiableMap(ret); }
RepositoryManagerWrapper implements RepositoryManager { @Override public Map<String, Repository> list() { ensureOpen(); final int estimatedSize = repos.size(); final String[] names = repos.keySet().toArray(new String[estimatedSize]); Arrays.sort(names); final Map<String, Repository> ret = new LinkedHashMap<>(names.length); for (String name : names) { final Repository repo = repos.get(name); if (repo != null) { ret.put(name, repo); } } return Collections.unmodifiableMap(ret); } }
RepositoryManagerWrapper implements RepositoryManager { @Override public Map<String, Repository> list() { ensureOpen(); final int estimatedSize = repos.size(); final String[] names = repos.keySet().toArray(new String[estimatedSize]); Arrays.sort(names); final Map<String, Repository> ret = new LinkedHashMap<>(names.length); for (String name : names) { final Repository repo = repos.get(name); if (repo != null) { ret.put(name, repo); } } return Collections.unmodifiableMap(ret); } RepositoryManagerWrapper(RepositoryManager repoManager,
                                    Function<Repository, Repository> repoWrapper); }
RepositoryManagerWrapper implements RepositoryManager { @Override public Map<String, Repository> list() { ensureOpen(); final int estimatedSize = repos.size(); final String[] names = repos.keySet().toArray(new String[estimatedSize]); Arrays.sort(names); final Map<String, Repository> ret = new LinkedHashMap<>(names.length); for (String name : names) { final Repository repo = repos.get(name); if (repo != null) { ret.put(name, repo); } } return Collections.unmodifiableMap(ret); } RepositoryManagerWrapper(RepositoryManager repoManager,
                                    Function<Repository, Repository> repoWrapper); @Override Project parent(); @Override void close(Supplier<CentralDogmaException> failureCauseSupplier); @Override boolean exists(String name); @Override Repository get(String name); @Override Repository create(String name, long creationTimeMillis, Author author); @Override Map<String, Repository> list(); @Override Map<String, Instant> listRemoved(); @Override void remove(String name); @Override Repository unremove(String name); @Override void purgeMarked(); @Override void markForPurge(String name); @Override void ensureOpen(); @Override String toString(); }
RepositoryManagerWrapper implements RepositoryManager { @Override public Map<String, Repository> list() { ensureOpen(); final int estimatedSize = repos.size(); final String[] names = repos.keySet().toArray(new String[estimatedSize]); Arrays.sort(names); final Map<String, Repository> ret = new LinkedHashMap<>(names.length); for (String name : names) { final Repository repo = repos.get(name); if (repo != null) { ret.put(name, repo); } } return Collections.unmodifiableMap(ret); } RepositoryManagerWrapper(RepositoryManager repoManager,
                                    Function<Repository, Repository> repoWrapper); @Override Project parent(); @Override void close(Supplier<CentralDogmaException> failureCauseSupplier); @Override boolean exists(String name); @Override Repository get(String name); @Override Repository create(String name, long creationTimeMillis, Author author); @Override Map<String, Repository> list(); @Override Map<String, Instant> listRemoved(); @Override void remove(String name); @Override Repository unremove(String name); @Override void purgeMarked(); @Override void markForPurge(String name); @Override void ensureOpen(); @Override String toString();  }