Source:
public Map<String, ServerImpl> getServers(ContainerInfo containerInfo, String internalHost, Map<String, ServerConfImpl> serverConfMap) { Map<String, List<PortBinding>> portBindings; Map<String, String> labels = Collections.emptyMap();; if (containerInfo.getNetworkSettings() != null && containerInfo.getNetworkSettings().getPorts() != null) { portBindings = containerInfo.getNetworkSettings().getPorts(); } else { return Collections.emptyMap(); } if (containerInfo.getConfig() != null && containerInfo.getConfig().getLabels() != null) { labels = containerInfo.getConfig().getLabels(); } Map<String, String> internalAddressesAndPorts = getInternalAddressesAndPorts(containerInfo, internalHost); Map<String, String> externalAddressesAndPorts = getExternalAddressesAndPorts(containerInfo, internalHost); Map<String, ServerImpl> servers = new LinkedHashMap<>(); for (String portProtocol : portBindings.keySet()) { String internalAddressAndPort = internalAddressesAndPorts.get(portProtocol); String externalAddressAndPort = externalAddressesAndPorts.get(portProtocol); ServerConfImpl serverConf = getServerConfImpl(portProtocol, labels, serverConfMap); String internalUrl = null, externalUrl = null; if (serverConf.getProtocol() != null) { String pathSuffix = serverConf.getPath(); if (pathSuffix != null && !pathSuffix.isEmpty()) { if (pathSuffix.charAt(0) != '/') { pathSuffix = "/" + pathSuffix; } } else { pathSuffix = ""; } internalUrl = serverConf.getProtocol() + "://" + internalAddressAndPort + pathSuffix; externalUrl = serverConf.getProtocol() + "://" + externalAddressAndPort + pathSuffix; } ServerProperties properties = new ServerPropertiesImpl(serverConf.getPath(), internalAddressAndPort, internalUrl); servers.put(portProtocol, new ServerImpl(serverConf.getRef(), serverConf.getProtocol(), externalAddressAndPort, externalUrl, properties)); } return servers; }

Target:
public Map<String, ServerImpl> getServers(ContainerInfo containerInfo, String internalHost, Map<String, ServerConfImpl> serverConfMap) { Map<String, List<PortBinding>> portBindings; Map<String, String> labels = Collections.emptyMap();; if (containerInfo.getNetworkSettings() != null && containerInfo.getNetworkSettings().getPorts() != null) { portBindings = containerInfo.getNetworkSettings().getPorts(); } else { return Collections.emptyMap(); } if (containerInfo.getConfig() != null && containerInfo.getConfig().getLabels() != null) { labels = containerInfo.getConfig().getLabels(); } Map<String, String> internalAddressesAndPorts = getInternalAddressesAndPorts(containerInfo, internalHost); Map<String, String> externalAddressesAndPorts = getExternalAddressesAndPorts(containerInfo, internalHost); Map<String, ServerImpl> servers = new LinkedHashMap<>(); for (String portProtocol : portBindings.keySet()) { String internalAddressAndPort = internalAddressesAndPorts.get(portProtocol); String externalAddressAndPort = externalAddressesAndPorts.get(portProtocol); ServerConfImpl serverConf = getServerConfImpl(portProtocol, labels, serverConfMap); String internalUrl = null; String externalUrl = null; if (serverConf.getProtocol() != null) { String pathSuffix = serverConf.getPath(); if (pathSuffix != null && !pathSuffix.isEmpty()) { if (pathSuffix.charAt(0) != '/') { pathSuffix = "/" + pathSuffix; } } else { pathSuffix = ""; } internalUrl = serverConf.getProtocol() + "://" + internalAddressAndPort + pathSuffix; externalUrl = serverConf.getProtocol() + "://" + externalAddressAndPort + pathSuffix; } ServerProperties properties = new ServerPropertiesImpl(serverConf.getPath(), internalAddressAndPort, internalUrl); servers.put(portProtocol, new ServerImpl(serverConf.getRef(), serverConf.getProtocol(), externalAddressAndPort, externalUrl, properties)); } return servers; }