Add Javadoc to MockHttpServletResponse
This commit adds Javadoc to the `getContentLength` method of `MockHttpServletResponse` to reflect that it gets its value from the HTTP response header. Closes gh-31833
This commit is contained in:
parent
50069ef029
commit
f846d9484c
|
@ -320,6 +320,11 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
|||
doAddHeaderValue(HttpHeaders.CONTENT_LENGTH, contentLength, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the length of the content body from the HTTP Content-Length header.
|
||||
* @return the value of the Content-Length header
|
||||
* @see #setContentLength(int)
|
||||
*/
|
||||
public int getContentLength() {
|
||||
return (int) this.contentLength;
|
||||
}
|
||||
|
|
|
@ -320,6 +320,11 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
|||
doAddHeaderValue(HttpHeaders.CONTENT_LENGTH, contentLength, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the length of the content body from the HTTP Content-Length header.
|
||||
* @return the value of the Content-Length header
|
||||
* @see #setContentLength(int)
|
||||
*/
|
||||
public int getContentLength() {
|
||||
return (int) this.contentLength;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue