Name: rmT116609 Date: 08/02/2001
J2SE 1.3.1 documentation
In the documentation for java.net.URL, many method descriptions fail to
specify whether the methods return null or empty strings.
For example, the getQuery() description says:
public String getQuery()
Returns the query part of this URL.
Returns:
the query part of this URL.
Specifically, it doesn't say what is returned if the URL contains no
query string.
In this case, one can figure out that getQuery() had better return null
to indicate the lack of a query string, so that case can be distinguished
from having a query string that is empty, but this still should be
documented.
It also happens in the following methods:
getPath()
getUserInfo()
getAuthority()
getProtocol()
getHost()
getFile()
getRef()
(Review ID: 129288)
======================================================================