Skip to content

Commit 450a3d7

Browse files
committed
polishing
1 parent 23e58aa commit 450a3d7

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

org.springframework.test/src/main/java/org/springframework/mock/web/MockHttpServletRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ public void setCharacterEncoding(String characterEncoding) {
306306
private void updateContentTypeHeader() {
307307
if (this.contentType != null) {
308308
StringBuilder sb = new StringBuilder(this.contentType);
309-
if (this.contentType.toLowerCase().indexOf(CHARSET_PREFIX) == -1 && this.characterEncoding != null) {
309+
if (!this.contentType.toLowerCase().contains(CHARSET_PREFIX) && this.characterEncoding != null) {
310310
sb.append(";").append(CHARSET_PREFIX).append(this.characterEncoding);
311311
}
312312
doAddHeaderValue(CONTENT_TYPE_HEADER, sb.toString(), true);

org.springframework.web.servlet/src/main/java/org/springframework/web/servlet/mvc/annotation/AnnotationMethodHandlerAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ private void handleHttpEntityResponse(HttpEntity<?> responseEntity, ServletWebRe
990990
HttpInputMessage inputMessage = createHttpInputMessage(webRequest);
991991
HttpOutputMessage outputMessage = createHttpOutputMessage(webRequest);
992992
if (responseEntity instanceof ResponseEntity && outputMessage instanceof ServerHttpResponse) {
993-
((ServerHttpResponse)outputMessage).setStatusCode(((ResponseEntity) responseEntity).getStatusCode());
993+
((ServerHttpResponse) outputMessage).setStatusCode(((ResponseEntity) responseEntity).getStatusCode());
994994
}
995995
HttpHeaders entityHeaders = responseEntity.getHeaders();
996996
if (!entityHeaders.isEmpty()) {

org.springframework.web/src/main/java/org/springframework/web/multipart/MultipartRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public interface MultipartRequest {
7979
* Determine the content type of the specified request part.
8080
* @param paramOrFileName the name of the part
8181
* @return the associated content type, or <code>null</code> if not defined
82+
* @since 3.1
8283
*/
8384
String getMultipartContentType(String paramOrFileName);
8485

0 commit comments

Comments
 (0)