Skip to content

Commit

Permalink
TemporalUnit methods removed (#2004)
Browse files Browse the repository at this point in the history
Signed-off-by: David Kral <david.k.kral@oracle.com>
  • Loading branch information
Verdent authored Jun 15, 2020
1 parent c803494 commit 217fdf2
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 65 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.net.URISyntaxException;
import java.net.URL;
import java.time.Duration;
import java.time.temporal.TemporalUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -256,20 +255,6 @@ public Builder config(Config config) {
return this;
}

/**
* Sets new connection timeout.
*
* @param amount amount of time
* @param unit time unit
* @deprecated use {@link WebClient.Builder#connectTimeout(long, TimeUnit)}, this method will be removed
* @return updated builder instance
*/
@Deprecated
public Builder connectTimeout(long amount, TemporalUnit unit) {
configuration.connectTimeout(Duration.of(amount, unit));
return this;
}

/**
* Sets new connection timeout.
*
Expand All @@ -282,20 +267,6 @@ public Builder connectTimeout(long amount, TimeUnit unit) {
return this;
}

/**
* Sets new read timeout.
*
* @param amount amount of time
* @param unit time unit
* @deprecated use {@link WebClient.Builder#readTimeout(long, TimeUnit)}, this method will be removed
* @return updated builder instance
*/
@Deprecated
public Builder readTimeout(long amount, TemporalUnit unit) {
configuration.readTimeout(Duration.of(amount, unit));
return this;
}

/**
* Sets new read timeout.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import java.net.URI;
import java.net.URL;
import java.time.temporal.TemporalUnit;
import java.util.Map;
import java.util.concurrent.CompletionStage;
import java.util.concurrent.Flow;
Expand Down Expand Up @@ -186,17 +185,6 @@ public interface WebClientRequestBuilder {
*/
WebClientRequestBuilder httpVersion(Http.Version httpVersion);

/**
* Sets new connection timeout for this request.
*
* @param amount amount of time
* @param unit time unit
* @deprecated use {@link WebClientRequestBuilder#connectTimeout(long, TimeUnit)}, this method will be removed
* @return updated builder instance
*/
@Deprecated
WebClientRequestBuilder connectTimeout(long amount, TemporalUnit unit);

/**
* Sets new connection timeout for this request.
*
Expand All @@ -206,17 +194,6 @@ public interface WebClientRequestBuilder {
*/
WebClientRequestBuilder connectTimeout(long amount, TimeUnit unit);

/**
* Sets new read timeout for this request.
*
* @param amount amount of time
* @param unit time unit
* @deprecated use {@link WebClientRequestBuilder#readTimeout(long, TimeUnit)}, this method will be removed
* @return updated builder instance
*/
@Deprecated
WebClientRequestBuilder readTimeout(long amount, TemporalUnit unit);

/**
* Sets new read timeout for this request.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
import java.time.temporal.TemporalUnit;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -264,24 +263,12 @@ public WebClientRequestBuilder httpVersion(Http.Version httpVersion) {
return this;
}

@Override
public WebClientRequestBuilder connectTimeout(long amount, TemporalUnit unit) {
this.connectTimeout = Duration.of(amount, unit);
return this;
}

@Override
public WebClientRequestBuilder connectTimeout(long amount, TimeUnit unit) {
this.connectTimeout = Duration.of(amount, unit.toChronoUnit());
return this;
}

@Override
public WebClientRequestBuilder readTimeout(long amount, TemporalUnit unit) {
this.readTimeout = Duration.of(amount, unit);
return this;
}

@Override
public WebClientRequestBuilder readTimeout(long amount, TimeUnit unit) {
this.readTimeout = Duration.of(amount, unit.toChronoUnit());
Expand Down

0 comments on commit 217fdf2

Please sign in to comment.