mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8294948: Document IllegalArgumentException and NullPointerException thrown by URLStreamHandler::parseURL and URLStreamHandler::setURL
Reviewed-by: jpai, aefimov, alanb, michaelm
This commit is contained in:
parent
dcd46501e6
commit
9d0cfd1130
2 changed files with 52 additions and 7 deletions
|
@ -129,6 +129,10 @@ public abstract class URLStreamHandler {
|
|||
* end of the string or the position of the
|
||||
* "{@code #}" character, if present. All information
|
||||
* after the sharp sign indicates an anchor.
|
||||
* @throws IllegalArgumentException if the implementation of the protocol
|
||||
* handler rejects any of the given parameters
|
||||
* @throws NullPointerException if {@code u} is {@code null},
|
||||
* or if {@code start < limit} and {@code spec} is {@code null}
|
||||
*/
|
||||
protected void parseURL(URL u, String spec, int start, int limit) {
|
||||
// These fields may receive context content if this was relative URL
|
||||
|
@ -497,6 +501,9 @@ public abstract class URLStreamHandler {
|
|||
* @param ref the reference.
|
||||
* @throws SecurityException if the protocol handler of the URL is
|
||||
* different from this one
|
||||
* @throws IllegalArgumentException if the implementation of the protocol
|
||||
* handler rejects any of the given parameters
|
||||
* @throws NullPointerException if {@code u} is {@code null}
|
||||
* @since 1.3
|
||||
*/
|
||||
protected void setURL(URL u, String protocol, String host, int port,
|
||||
|
@ -539,6 +546,9 @@ public abstract class URLStreamHandler {
|
|||
* @param ref the reference.
|
||||
* @throws SecurityException if the protocol handler of the URL is
|
||||
* different from this one
|
||||
* @throws IllegalArgumentException if the implementation of the protocol
|
||||
* handler rejects any of the given parameters
|
||||
* @throws NullPointerException if {@code u} is {@code null}
|
||||
* @deprecated Use setURL(URL, String, String, int, String, String, String,
|
||||
* String);
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue