@Test public void namespacingCanDealWithTrailingSlash() { ServerListConfig namespacedServersList = ServerListConfigs.namespaceUris(SERVERS_LIST_3, CLIENT); assertThat(namespacedServersList.servers()).containsExactlyInAnyOrder("three/client"); }
public static ServerListConfig namespaceUris(ServerListConfig config, String namespace) { Set<String> serversWithNamespaces = config .servers() .stream() .map(serverAddress -> serverAddress.replaceAll("/$", "") + "/" + namespace) .collect(Collectors.toSet()); return ImmutableServerListConfig.builder() .from(config) .servers(serversWithNamespaces) .build(); }
ServerListConfigs { public static ServerListConfig namespaceUris(ServerListConfig config, String namespace) { Set<String> serversWithNamespaces = config .servers() .stream() .map(serverAddress -> serverAddress.replaceAll("/$", "") + "/" + namespace) .collect(Collectors.toSet()); return ImmutableServerListConfig.builder() .from(config) .servers(serversWithNamespaces) .build(); } }
ServerListConfigs { public static ServerListConfig namespaceUris(ServerListConfig config, String namespace) { Set<String> serversWithNamespaces = config .servers() .stream() .map(serverAddress -> serverAddress.replaceAll("/$", "") + "/" + namespace) .collect(Collectors.toSet()); return ImmutableServerListConfig.builder() .from(config) .servers(serversWithNamespaces) .build(); } private  ServerListConfigs(); }
ServerListConfigs { public static ServerListConfig namespaceUris(ServerListConfig config, String namespace) { Set<String> serversWithNamespaces = config .servers() .stream() .map(serverAddress -> serverAddress.replaceAll("/$", "") + "/" + namespace) .collect(Collectors.toSet()); return ImmutableServerListConfig.builder() .from(config) .servers(serversWithNamespaces) .build(); } private  ServerListConfigs(); static Refreshable<ServerListConfig> parseInstallAndRuntimeConfigs(TimeLockClientConfig installClientConfig,
            Refreshable<Optional<TimeLockRuntimeConfig>> runtimeConfig); static ServerListConfig namespaceUris(ServerListConfig config, String namespace); }
ServerListConfigs { public static ServerListConfig namespaceUris(ServerListConfig config, String namespace) { Set<String> serversWithNamespaces = config .servers() .stream() .map(serverAddress -> serverAddress.replaceAll("/$", "") + "/" + namespace) .collect(Collectors.toSet()); return ImmutableServerListConfig.builder() .from(config) .servers(serversWithNamespaces) .build(); } private  ServerListConfigs(); static Refreshable<ServerListConfig> parseInstallAndRuntimeConfigs(TimeLockClientConfig installClientConfig,
            Refreshable<Optional<TimeLockRuntimeConfig>> runtimeConfig); static ServerListConfig namespaceUris(ServerListConfig config, String namespace);  }