According to the API specification, the URLConnection.connect() method
should throw an IOException if an error occurs. However in GNU Classpath if
the address cannot be resolved, a
java.nio.channels.UnresolvedAddressException is thrown instead.
UnresolvedAddressException is a subclass of IllegalArgumentException, not
IOException, so this breaks the API contract.

I have added a bug in the bugtracker for this including sample code.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70661

--
Guillermo Rodriguez Garcia
guille.rodrig...@gmail.com

Reply via email to