Browse Source

Polishing

pull/27891/head
Juergen Hoeller 6 years ago
parent
commit
7281d44178
  1. 4
      spring-web/src/main/java/org/springframework/http/RequestEntity.java
  2. 5
      spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java

4
spring-web/src/main/java/org/springframework/http/RequestEntity.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -65,6 +65,8 @@ import org.springframework.util.ObjectUtils; @@ -65,6 +65,8 @@ import org.springframework.util.ObjectUtils;
* @param <T> the body type
* @see #getMethod()
* @see #getUrl()
* @see org.springframework.web.client.RestOperations#exchange(RequestEntity, Class)
* @see ResponseEntity
*/
public class RequestEntity<T> extends HttpEntity<T> {

5
spring-webflux/src/main/java/org/springframework/web/reactive/function/client/DefaultWebClient.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -398,7 +398,7 @@ class DefaultWebClient implements WebClient { @@ -398,7 +398,7 @@ class DefaultWebClient implements WebClient {
private static class DefaultResponseSpec implements ResponseSpec {
private static final IntPredicate STATUS_CODE_ERROR = value -> value >= 400;
private static final IntPredicate STATUS_CODE_ERROR = (value -> value >= 400);
private static final StatusHandler DEFAULT_STATUS_HANDLER =
new StatusHandler(STATUS_CODE_ERROR, DefaultResponseSpec::createResponseException);
@ -418,6 +418,7 @@ class DefaultWebClient implements WebClient { @@ -418,6 +418,7 @@ class DefaultWebClient implements WebClient {
@Override
public ResponseSpec onStatus(Predicate<HttpStatus> statusPredicate,
Function<ClientResponse, Mono<? extends Throwable>> exceptionFunction) {
return onRawStatus(toIntPredicate(statusPredicate), exceptionFunction);
}

Loading…
Cancel
Save