URL.hashCode()

Deadly trap all Java programmers should know: URL.equals() and URL.hashCode() resolve the hostname in the URL, then compare equality by IP address. Which means 1) these methods are way too slow and 2) virtual hosts break them — every RSS feed URL on blogspot.com (for example) compares equal. This innocent-looking code to cache RSS feeds […]