@Throws NullPointerException need to add HttpRequest.Builder as null checks are available for most of the implementation.
Ex:-
public HttpRequest.Builder timeout(TimeUnit timeunit, long timeval) {
Objects.requireNonNull(timeunit);
.....
JavaDoc :-
timeout
public abstract HttpRequest.Builder timeout(TimeUnit unit,
long timeval)
Sets a timeout for this request. If the response is not received within the specified timeout then a HttpTimeoutException is thrown from HttpRequest.response() or HttpRequest.responseAsync()completes exceptionally with a HttpTimeoutException.
Parameters:
unit - the timeout units
timeval - the number of units to wait for
Returns:
this request builder
Ex:-
public HttpRequest.Builder timeout(TimeUnit timeunit, long timeval) {
Objects.requireNonNull(timeunit);
.....
JavaDoc :-
timeout
public abstract HttpRequest.Builder timeout(TimeUnit unit,
long timeval)
Sets a timeout for this request. If the response is not received within the specified timeout then a HttpTimeoutException is thrown from HttpRequest.response() or HttpRequest.responseAsync()completes exceptionally with a HttpTimeoutException.
Parameters:
unit - the timeout units
timeval - the number of units to wait for
Returns:
this request builder