private static void removeDuplicates(List<URL> overrideUrls) {
        Set<String> urls = new HashSet<String>(overrideUrls.size());
        Iterator<URL> urlIterator = overrideUrls.iterator();
        while (urlIterator.hasNext()) {
            String url = urlIterator.next().toString();
            if (urls.contains(url)) {
                urlIterator.remove();
            } else {
                urls.add(url);
            }
        }
    }
Remove duplicates from the provided list, while preserving the order of the elements in this list. We do this
manually instead of using a LinkedHashSet for the override URLs, because the set would invoke the URL's equals method.
URL's equals method requires a DNS query, which is not desired.
aws-java-sdk-core/src/main/java/com/amazonaws/internal/config/InternalConfig.java