URLStreamHandler::parseURL and URLStreamHandler::setURL may throw an IllegalArgumentException if passed malformed/illegal parameters.
This behavior should be documented.
Note that when these methods are called from URL constructors, the exception is later transformed into MalformedURLException by the constructor.
We should also document (possibly in a blanket statement in URL?) that all URL constructors may also throw MalformedURLException if the underlying URLStreamHandler reject any arguments by throwing IllegalArgumentException.
This behavior should be documented.
Note that when these methods are called from URL constructors, the exception is later transformed into MalformedURLException by the constructor.
We should also document (possibly in a blanket statement in URL?) that all URL constructors may also throw MalformedURLException if the underlying URLStreamHandler reject any arguments by throwing IllegalArgumentException.
- csr for
-
JDK-8294984 Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL
-
- Closed
-