Polish
This commit is contained in:
parent
f6504c5f91
commit
2d1e58b928
|
|
@ -145,7 +145,7 @@ public class MockHttpServletRequestBuilder
|
|||
* <p>Although this class cannot be extended, additional ways to initialize
|
||||
* the {@code MockHttpServletRequest} can be plugged in via
|
||||
* {@link #with(RequestPostProcessor)}.
|
||||
* @param httpMethod the HTTP method (GET, POST, etc)
|
||||
* @param httpMethod the HTTP method (GET, POST, etc.)
|
||||
* @param url a URL template; the resulting URL will be encoded
|
||||
* @param vars zero or more URI variables
|
||||
*/
|
||||
|
|
@ -164,7 +164,7 @@ public class MockHttpServletRequestBuilder
|
|||
/**
|
||||
* Alternative to {@link #MockHttpServletRequestBuilder(HttpMethod, String, Object...)}
|
||||
* with a pre-built URI.
|
||||
* @param httpMethod the HTTP method (GET, POST, etc)
|
||||
* @param httpMethod the HTTP method (GET, POST, etc.)
|
||||
* @param url the URL
|
||||
* @since 4.0.3
|
||||
*/
|
||||
|
|
@ -797,7 +797,7 @@ public class MockHttpServletRequestBuilder
|
|||
}
|
||||
}
|
||||
catch (Exception ex) {
|
||||
// Must be invalid, ignore..
|
||||
// Must be invalid, ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -894,7 +894,8 @@ public class MockHttpServletRequestBuilder
|
|||
HttpInputMessage message = new HttpInputMessage() {
|
||||
@Override
|
||||
public InputStream getBody() {
|
||||
return (content != null ? new ByteArrayInputStream(content) : InputStream.nullInputStream());
|
||||
byte[] bodyContent = MockHttpServletRequestBuilder.this.content;
|
||||
return (bodyContent != null ? new ByteArrayInputStream(bodyContent) : InputStream.nullInputStream());
|
||||
}
|
||||
@Override
|
||||
public HttpHeaders getHeaders() {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ public abstract class MockMvcRequestBuilders {
|
|||
|
||||
/**
|
||||
* Create a {@link MockHttpServletRequestBuilder} for a request with the given HTTP method.
|
||||
* @param method the HTTP method (GET, POST, etc)
|
||||
* @param method the HTTP method (GET, POST, etc.)
|
||||
* @param urlTemplate a URL template; the resulting URL will be encoded
|
||||
* @param uriVariables zero or more URI variables
|
||||
*/
|
||||
|
|
@ -186,7 +186,7 @@ public abstract class MockMvcRequestBuilders {
|
|||
|
||||
/**
|
||||
* Create a {@link MockHttpServletRequestBuilder} for a request with the given HTTP method.
|
||||
* @param httpMethod the HTTP method (GET, POST, etc)
|
||||
* @param httpMethod the HTTP method (GET, POST, etc.)
|
||||
* @param uri the URL
|
||||
* @since 4.0.3
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue