Collection<MavenServerConnector> () { Set<MavenServerConnector> set = Collections.newSetFromMap(new IdentityHashMap<>()); synchronized (myMultimoduleDirToConnectorMap) { set.addAll(myMultimoduleDirToConnectorMap.values()); if (myIndexingConnector != null) { set.add(myIndexingConnector); } } return set; }