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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user