Skip to content

Commit 75d1428

Browse files
committed
Polishing
1 parent 5a308ad commit 75d1428

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-web/src/main/java/org/springframework/http/converter/FormHttpMessageConverter.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ private void writeForm(MultiValueMap<String, Object> formData, @Nullable MediaTy
376376
Charset charset = contentType.getCharset();
377377
Assert.notNull(charset, "No charset"); // should never occur
378378

379-
final byte[] bytes = serializeForm(formData, charset).getBytes(charset);
379+
byte[] bytes = serializeForm(formData, charset).getBytes(charset);
380380
outputMessage.getHeaders().setContentLength(bytes.length);
381381

382382
if (outputMessage instanceof StreamingHttpOutputMessage) {
@@ -422,17 +422,17 @@ protected String serializeForm(MultiValueMap<String, Object> formData, Charset c
422422
return builder.toString();
423423
}
424424

425-
private void writeMultipart(final MultiValueMap<String, Object> parts, MediaType contentType, HttpOutputMessage outputMessage)
425+
private void writeMultipart(MultiValueMap<String, Object> parts, MediaType contentType, HttpOutputMessage outputMessage)
426426
throws IOException {
427427

428428
// If the supplied content type is null, fall back to multipart/form-data.
429429
// Otherwise rely on the fact that isMultipart() already verified the
430-
// supplied content type is multipart/*.
430+
// supplied content type is multipart.
431431
if (contentType == null) {
432432
contentType = MediaType.MULTIPART_FORM_DATA;
433433
}
434434

435-
final byte[] boundary = generateMultipartBoundary();
435+
byte[] boundary = generateMultipartBoundary();
436436
Map<String, String> parameters = new LinkedHashMap<>(2);
437437
if (!isFilenameCharsetSet()) {
438438
parameters.put("charset", this.charset.name());

0 commit comments

Comments
 (0)