Skip to content

Commit

Permalink
Mention HttpStatus and StatusCode in JavaDoc in more places (#454)
Browse files Browse the repository at this point in the history
* Add JavaDoc @see cross-references between HttpStatus and StatusClass
* Mention HttpStatus in JavaDoc of HttpResponse.getCode
  • Loading branch information
unkarjedy authored and ok2c committed Jan 25, 2024
1 parent 30b3a20 commit c68ce90
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ public interface HttpResponse extends HttpMessage {
* Obtains the code of this response message.
*
* @return the status code.
*
* @see HttpStatus
*/
int getCode();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
* @see <a href="https://tools.ietf.org/html/rfc2817">RFC 2817 (Upgrading to TLS Within HTTP/1.1)</a>
* @see <a href="https://tools.ietf.org/html/rfc8470">RFC 8470 (Using Early Data in HTTP)</a>
* @since 4.0
* @see org.apache.hc.core5.http.message.StatusLine.StatusClass
* @see org.apache.hc.core5.http.message.StatusLine.StatusClass#from(int)
*/
public final class HttpStatus {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ public String toString() {

/**
* Standard classes of HTTP status codes, plus {@code OTHER} for non-standard codes.
* @see org.apache.hc.core5.http.HttpStatus
*/
public enum StatusClass {

Expand Down Expand Up @@ -212,6 +213,7 @@ public enum StatusClass {
*
* @param statusCode response status code to get the class for.
* @return class of the response status code.
* @see org.apache.hc.core5.http.HttpStatus
*/
public static StatusClass from(final int statusCode) {
final StatusClass statusClass;
Expand Down

0 comments on commit c68ce90

Please sign in to comment.