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 42c7a03ceff..136cf225023 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 0217c4f9bbd..c468339725e 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-2021 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. @@ -30,7 +30,8 @@ import org.springframework.lang.Nullable; /** * Interface specifying a basic set of RESTful operations. - * Implemented by {@link RestTemplate}. Not often used directly, but a useful + * + *
Implemented by {@link RestTemplate}. Not often used directly, but a useful
* option to enhance testability, as it can easily be mocked or stubbed.
*
* @author Arjen Poutsma
@@ -67,7 +68,7 @@ public interface RestOperations {
URI Template variables are expanded using the given URI variables, if any.
* @param url the URL
* @param responseType the type of the return value
@@ -91,7 +92,7 @@ public interface RestOperations {
/**
* Retrieve a representation by doing a GET on the URI template.
- * The response is converted and stored in an {@link ResponseEntity}.
+ * The response is converted and stored in a {@link ResponseEntity}.
* URI Template variables are expanded using the given map.
* @param url the URL
* @param responseType the type of the return value
@@ -103,8 +104,8 @@ public interface RestOperations {
throws RestClientException;
/**
- * Retrieve a representation by doing a GET on the URL .
- * The response is converted and stored in an {@link ResponseEntity}.
+ * Retrieve a representation by doing a GET on the URL.
+ * The response is converted and stored in a {@link ResponseEntity}.
* @param url the URL
* @param responseType the type of the return value
* @return the converted object
@@ -144,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
@@ -164,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
@@ -185,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.
@@ -204,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.
@@ -226,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.
@@ -248,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
@@ -267,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.
@@ -288,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.
@@ -309,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
@@ -373,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
@@ -382,8 +383,7 @@ public interface RestOperations {
* @since 4.3.5
* @see HttpEntity
* @see RestTemplate#setRequestFactory
- * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
+ * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
*/
@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
@@ -405,8 +405,7 @@ public interface RestOperations {
* @since 4.3.5
* @see HttpEntity
* @see RestTemplate#setRequestFactory
- * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
+ * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
*/
@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
@@ -426,8 +425,7 @@ public interface RestOperations {
* @since 4.3.5
* @see HttpEntity
* @see RestTemplate#setRequestFactory
- * @see org.springframework.http.client.HttpComponentsAsyncClientHttpRequestFactory
- * @see org.springframework.http.client.OkHttp3ClientHttpRequestFactory
+ * @see org.springframework.http.client.HttpComponentsClientHttpRequestFactory
*/
@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)
@@ -507,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)
@@ -523,8 +521,8 @@ public interface RestOperations {
Class
* ParameterizedTypeReference<List<MyBean>> myBean =
@@ -561,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 =
@@ -584,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 =