Skip to content

Commit f56c54d

Browse files
committed
Polishing
1 parent da582da commit f56c54d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,11 @@ public MultiValueMap<String, String> read(@Nullable Class<? extends MultiValueMa
267267
public void write(MultiValueMap<String, ?> map, @Nullable MediaType contentType, HttpOutputMessage outputMessage)
268268
throws IOException, HttpMessageNotWritableException {
269269

270-
if (!isMultipart(map, contentType)) {
271-
writeForm((MultiValueMap<String, Object>) map, contentType, outputMessage);
270+
if (isMultipart(map, contentType)) {
271+
writeMultipart((MultiValueMap<String, Object>) map, outputMessage);
272272
}
273273
else {
274-
writeMultipart((MultiValueMap<String, Object>) map, outputMessage);
274+
writeForm((MultiValueMap<String, Object>) map, contentType, outputMessage);
275275
}
276276
}
277277

spring-web/src/main/java/org/springframework/web/bind/annotation/ControllerAdvice.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
* <p>Classes with {@code @ControllerAdvice} can be declared explicitly as Spring
3636
* beans or auto-detected via classpath scanning. All such beans are sorted via
3737
* {@link org.springframework.core.annotation.AnnotationAwareOrderComparator
38-
* AnnotationAwareOrderComparator}, i.e. based on
38+
* AnnotationAwareOrderComparator}, based on
3939
* {@link org.springframework.core.annotation.Order @Order} and
4040
* {@link org.springframework.core.Ordered Ordered}, and applied in that order
4141
* at runtime. For handling exceptions, an {@code @ExceptionHandler} will be
@@ -51,12 +51,12 @@
5151
* root exception mappings on a prioritized advice bean with a corresponding order.
5252
*
5353
* <p>By default, the methods in an {@code @ControllerAdvice} apply globally to
54-
* all controllers. Use selectors {@link #annotations},
54+
* all controllers. Use selectors such as {@link #annotations},
5555
* {@link #basePackageClasses}, and {@link #basePackages} (or its alias
5656
* {@link #value}) to define a more narrow subset of targeted controllers.
5757
* If multiple selectors are declared, boolean {@code OR} logic is applied, meaning
5858
* selected controllers should match at least one selector. Note that selector checks
59-
* are performed at runtime and so adding many selectors may negatively impact
59+
* are performed at runtime, so adding many selectors may negatively impact
6060
* performance and add complexity.
6161
*
6262
* @author Rossen Stoyanchev

0 commit comments

Comments
 (0)