4 ms·
It's been a while for me too, but I think I recall common advice to use java.net.URI instead of java.net.URL wherever possible, at least partly for that reason.
by wging 2y ago
It's been a while for me too, but I think I recall common advice to use java.net.URI instead of java.net.URL wherever possible, at least partly for that reason. Also, the javadocs of URL now state: "The java.net.URL constructors are deprecated. Developers are encouraged to use java.net.URI to parse or construct a URL."