diff --git a/spring-test/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java b/spring-test/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java index b64472c9b4e..fc5b1bc70f8 100644 --- a/spring-test/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java +++ b/spring-test/src/main/java/org/springframework/test/web/client/MockMvcClientHttpRequestFactory.java @@ -35,7 +35,6 @@ import org.springframework.util.Assert; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.request; - /** * A {@link ClientHttpRequestFactory} for requests executed via {@link MockMvc}. * diff --git a/spring-test/src/main/java/org/springframework/test/web/servlet/MvcResult.java b/spring-test/src/main/java/org/springframework/test/web/servlet/MvcResult.java index 6245fa0a616..31b2e15b472 100644 --- a/spring-test/src/main/java/org/springframework/test/web/servlet/MvcResult.java +++ b/spring-test/src/main/java/org/springframework/test/web/servlet/MvcResult.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2024 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. @@ -34,13 +34,13 @@ public interface MvcResult { /** * Return the performed request. - * @return the request, never {@code null} + * @return the request (never {@code null}) */ MockHttpServletRequest getRequest(); /** * Return the resulting response. - * @return the response, never {@code null} + * @return the response (never {@code null}) */ MockHttpServletResponse getResponse(); diff --git a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java index 4ce6fc72638..440fad582a5 100644 --- a/spring-web/src/main/java/org/springframework/web/client/RestOperations.java +++ b/spring-web/src/main/java/org/springframework/web/client/RestOperations.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2023 the original author or authors. + * Copyright 2002-2024 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. @@ -145,7 +145,7 @@ public interface RestOperations { // POST /** - * Create a new resource by POSTing the given object to the URI template, and returns the value of + * Create a new resource by POSTing the given object to the URI template, and return the value of * the {@code Location} header. This header typically indicates where the new resource is stored. *
URI Template variables are expanded using the given URI variables, if any. *
The {@code request} parameter can be a {@link HttpEntity} in order to @@ -165,7 +165,7 @@ public interface RestOperations { URI postForLocation(String url, @Nullable Object request, Object... uriVariables) throws RestClientException; /** - * Create a new resource by POSTing the given object to the URI template, and returns the value of + * Create a new resource by POSTing the given object to the URI template, and return the value of * the {@code Location} header. This header typically indicates where the new resource is stored. *
URI Template variables are expanded using the given map. *
The {@code request} parameter can be a {@link HttpEntity} in order to @@ -186,7 +186,7 @@ public interface RestOperations { throws RestClientException; /** - * Create a new resource by POSTing the given object to the URL, and returns the value of the + * Create a new resource by POSTing the given object to the URL, and return the value of the * {@code Location} header. This header typically indicates where the new resource is stored. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. @@ -205,7 +205,7 @@ public interface RestOperations { /** * Create a new resource by POSTing the given object to the URI template, - * and returns the representation found in the response. + * and return the representation found in the response. *
URI Template variables are expanded using the given URI variables, if any. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. @@ -227,7 +227,7 @@ public interface RestOperations { /** * Create a new resource by POSTing the given object to the URI template, - * and returns the representation found in the response. + * and return the representation found in the response. *
URI Template variables are expanded using the given map. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. @@ -249,7 +249,7 @@ public interface RestOperations { /** * Create a new resource by POSTing the given object to the URL, - * and returns the representation found in the response. + * and return the representation found in the response. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. *
The body of the entity, or {@code request} itself, can be a @@ -268,7 +268,7 @@ public interface RestOperations { /** * Create a new resource by POSTing the given object to the URI template, - * and returns the response as {@link ResponseEntity}. + * and return the response as {@link ResponseEntity}. *
URI Template variables are expanded using the given URI variables, if any. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. @@ -289,7 +289,7 @@ public interface RestOperations { /** * Create a new resource by POSTing the given object to the URI template, - * and returns the response as {@link HttpEntity}. + * and return the response as {@link HttpEntity}. *
URI Template variables are expanded using the given map. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. @@ -310,7 +310,7 @@ public interface RestOperations { /** * Create a new resource by POSTing the given object to the URL, - * and returns the response as {@link ResponseEntity}. + * and return the response as {@link ResponseEntity}. *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. *
The body of the entity, or {@code request} itself, can be a @@ -374,7 +374,7 @@ public interface RestOperations { *
The {@code request} parameter can be a {@link HttpEntity} in order to * add additional HTTP headers to the request. *
NOTE: The standard JDK HTTP library does not support HTTP PATCH.
- * You need to use the Apache HttpComponents or OkHttp request factory.
+ * You need to use e.g. the Apache HttpComponents request factory.
* @param url the URL
* @param request the object to be PATCHed (may be {@code null})
* @param responseType the type of the return value
@@ -384,7 +384,6 @@ public interface RestOperations {
* @see HttpEntity
* @see RestTemplate#setRequestFactory
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
*/
@Nullable
The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* NOTE: The standard JDK HTTP library does not support HTTP PATCH.
- * You need to use the Apache HttpComponents or OkHttp request factory.
+ * You need to use e.g. the Apache HttpComponents request factory.
* @param url the URL
* @param request the object to be PATCHed (may be {@code null})
* @param responseType the type of the return value
@@ -407,7 +406,6 @@ public interface RestOperations {
* @see HttpEntity
* @see RestTemplate#setRequestFactory
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
*/
@Nullable
The {@code request} parameter can be a {@link HttpEntity} in order to
* add additional HTTP headers to the request.
* NOTE: The standard JDK HTTP library does not support HTTP PATCH.
- * You need to use the Apache HttpComponents or OkHttp request factory.
+ * You need to use e.g. the Apache HttpComponents request factory.
* @param url the URL
* @param request the object to be PATCHed (may be {@code null})
* @param responseType the type of the return value
@@ -428,7 +426,6 @@ public interface RestOperations {
* @see HttpEntity
* @see RestTemplate#setRequestFactory
* @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
*/
@Nullable
URI Template variables are expanded using the given URI variables, if any.
* @param url the URL
* @param method the HTTP method (GET, POST, etc)
@@ -508,8 +505,8 @@ public interface RestOperations {
Class URI Template variables are expanded using the given URI variables, if any.
* @param url the URL
* @param method the HTTP method (GET, POST, etc)
@@ -524,8 +521,8 @@ public interface RestOperations {
Class
* ParameterizedTypeReference<List<MyBean>> myBean =
@@ -562,7 +559,7 @@ public interface RestOperations {
/**
* Execute the HTTP method to the given URI template, writing the given
- * request entity to the request, and returns the response as {@link ResponseEntity}.
+ * request entity to the request, and return the response as {@link ResponseEntity}.
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
*
* ParameterizedTypeReference<List<MyBean>> myBean =
@@ -585,7 +582,7 @@ public interface RestOperations {
/**
* Execute the HTTP method to the given URI template, writing the given
- * request entity to the request, and returns the response as {@link ResponseEntity}.
+ * request entity to the request, and return the response as {@link ResponseEntity}.
* The given {@link ParameterizedTypeReference} is used to pass generic type information:
*
* ParameterizedTypeReference<List<MyBean>> myBean =