URLConnection.connect() throws incorrect exception for unresolved addresses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.rodriguez@xxxxxxxxx

[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux