Alex Rivera | Logout

Why does java.net.URL's hashcode resolve the host to an IP?

Asked 2010-02-27T18:08:51.783
17

Is the idea after the first resolution it'll rely on OS caching? Still this seems inefficient and in cases of multiple domains resolving to the same IP, incorrect. What am I missing?

Edit
Report

1 Answer

9

A lot of people think this was a very bad idea.

Here's some explanation from the Javadoc of URI. This question is also useful.

answered 2010-02-27T18:33:10.990

Your Answer