8231632: HttpURLConnection::usingProxy could specify that it may lazily evaluate the fact

Modified method description to disambiguate when false is returned and altered implementation

Reviewed-by: dfuchs, chegar, vtewari
This commit is contained in:
Julia Boes 2019-11-01 12:57:01 +00:00
parent 9c7e4bcf59
commit 012dffcd27
3 changed files with 365 additions and 5 deletions

View file

@ -618,8 +618,13 @@ public abstract class HttpURLConnection extends URLConnection {
/**
* Indicates if the connection is going through a proxy.
* @return a boolean indicating if the connection is
* using a proxy.
*
* This method returns {@code true} if the connection is known
* to be going or has gone through proxies, and returns {@code false}
* if the connection will never go through a proxy or if
* the use of a proxy cannot be determined.
*
* @return a boolean indicating if the connection is using a proxy.
*/
public abstract boolean usingProxy();