Skip to content

Commit 4a49ce9

Browse files
committed
Polish Javadoc for @ResponseStatus
1 parent de2e201 commit 4a49ce9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,16 @@
3232
* <p>The status code is applied to the HTTP response when the handler
3333
* method is invoked.
3434
*
35-
* <p><strong>Note:</strong> when using this annotation on an exception class,
36-
* or when setting the {@code reason} attribute of the annotation,
35+
* <p><strong>Warning</strong>: when using this annotation on an exception
36+
* class, or when setting the {@code reason} attribute of this annotation,
3737
* the {@code HttpServletResponse.sendError} method will be used.
3838
*
39-
* With {@code HttpServletResponse.sendError}, the response is considered
40-
* complete and should not be written to any further.
41-
* Furthermore servlet container will typically write an HTML error page
42-
* therefore making the use of a reason unsuitable for REST APIs.
43-
* For such cases prefer the use of {@link org.springframework.http.ResponseEntity}
44-
* as a return type and avoid {@code ResponseStatus} altogether.
39+
* <p>With {@code HttpServletResponse.sendError}, the response is considered
40+
* complete and should not be written to any further. Furthermore, the Servlet
41+
* container will typically write an HTML error page therefore making the
42+
* use of a {@code reason} unsuitable for REST APIs. For such cases it is
43+
* preferable to use a {@link org.springframework.http.ResponseEntity} as
44+
* a return type and avoid the use of {@code @ResponseStatus} altogether.
4545
*
4646
* @author Arjen Poutsma
4747
* @author Sam Brannen

0 commit comments

Comments
 (0)