Skip to content

Commit 9dd7a86

Browse files
committed
Update typos and javadocs
1 parent a523a95 commit 9dd7a86

File tree

1 file changed

+68
-13
lines changed

1 file changed

+68
-13
lines changed

src/main/java/io/github/malczuuu/problem4j/core/ProblemStatus.java

Lines changed: 68 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,59 @@
2626
* <p>This enum can be used to represent response status codes in a library-agnostic way, without
2727
* introducing dependencies on specific frameworks like Spring.
2828
*
29-
* @see <a href="https://datatracker.ietf.org/doc/html/rfc9110#name-status-codes">RFC9110 - HTTP
30-
* Semantics</a>
29+
* <p><b>Referenced RFC sources (chronological)</b>:
30+
*
31+
* <ul>
32+
* <li><b>1998-03</b> - RFC 2295: Transparent Content Negotiation in HTTP (<a
33+
* href="https://datatracker.ietf.org/doc/html/rfc2295">link</a>) - introduces 506 Variant
34+
* Also Negotiates.
35+
* <li><b>1998-04</b> - RFC 2324: Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0) (<a
36+
* href="https://datatracker.ietf.org/doc/html/rfc2324">link</a>) - adds novelty code 418 I'm
37+
* a teapot.
38+
* <li><b>1999-02</b> - RFC 2518: HTTP Extensions for Distributed Authoring (WebDAV) (<a
39+
* href="https://datatracker.ietf.org/doc/html/rfc2518">link</a>) - defines 102 Processing,
40+
* 207 Multi-Status, 422 Unprocessable Entity, 423 Locked, 424 Failed Dependency.
41+
* <li><b>1999-06</b> - RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1 (Obsoleted) (<a
42+
* href="https://datatracker.ietf.org/doc/html/rfc2616">link</a>) - core set:
43+
* 100,101,200–206,300–305,400–417,500–505.
44+
* <li><b>2000-02</b> - RFC 2774: An HTTP Extension Framework (<a
45+
* href="https://datatracker.ietf.org/doc/html/rfc2774">link</a>) - adds 510 Not Extended.
46+
* <li><b>2002-01</b> - RFC 3229: Delta encoding in HTTP (<a
47+
* href="https://datatracker.ietf.org/doc/html/rfc3229">link</a>) - adds 226 IM Used.
48+
* <li><b>2007-06</b> - RFC 4918: WebDAV (replacing RFC 2518) (<a
49+
* href="https://datatracker.ietf.org/doc/html/rfc4918">link</a>) - re-specifies
50+
* 102,207,422,423,424; adds 507 Insufficient Storage.
51+
* <li><b>2010-05</b> - RFC 5842: Binding Extensions to WebDAV (<a
52+
* href="https://datatracker.ietf.org/doc/html/rfc5842">link</a>) - adds 208 Already Reported,
53+
* 508 Loop Detected.
54+
* <li><b>2012-04</b> - RFC 6585: Additional HTTP Status Codes (<a
55+
* href="https://datatracker.ietf.org/doc/html/rfc6585">link</a>) - adds 428 Precondition
56+
* Required, 429 Too Many Requests, 431 Request Header Fields Too Large, 511 Network
57+
* Authentication Required.
58+
* <li><b>2014-06</b> - RFC 7231: HTTP/1.1 Semantics and Content (<a
59+
* href="https://datatracker.ietf.org/doc/html/rfc7231">link</a>) - deprecates 305 Use Proxy;
60+
* renames 413 Request Entity Too Large → Payload Too Large; 414 Request-URI Too Long → URI
61+
* Too Long.
62+
* <li><b>2015-04</b> - RFC 7538: Status Code 308 (Permanent Redirect) (<a
63+
* href="https://datatracker.ietf.org/doc/html/rfc7538">link</a>) - adds 308 Permanent
64+
* Redirect.
65+
* <li><b>2015-05</b> - RFC 7540: HTTP/2 (<a
66+
* href="https://datatracker.ietf.org/doc/html/rfc7540">link</a>) - adds 421 Misdirected
67+
* Request.
68+
* <li><b>2016-02</b> - RFC 7725: An HTTP Status Code to Report Legal Obstacles (<a
69+
* href="https://datatracker.ietf.org/doc/html/rfc7725">link</a>) - adds 451 Unavailable For
70+
* Legal Reasons.
71+
* <li><b>2018-01</b> - RFC 8297: Indicating Hints (<a
72+
* href="https://datatracker.ietf.org/doc/html/rfc8297">link</a>) - adds 103 Early Hints;
73+
* obsoletes informal 103 Checkpoint name.
74+
* <li><b>2018-09</b> - RFC 8470: Using Early Data in HTTP (<a
75+
* href="https://datatracker.ietf.org/doc/html/rfc8470">link</a>) - adds 425 Too Early.
76+
* <li><b>2022-06</b> - RFC 9110: HTTP Semantics (<a
77+
* href="https://datatracker.ietf.org/doc/html/rfc9110">link</a>) - renames 413 Payload Too
78+
* Large → Content Too Large; 416 Requested Range Not Satisfiable → Range Not Satisfiable; 422
79+
* Unprocessable Entity → Unprocessable Content; consolidates prior semantics.
80+
* </ul>
81+
*
3182
* @see <a href="https://http.cat/">HTTP Cats</a>
3283
* @see <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status">HTTP response
3384
* status codes - HTTP | MDN</a>
@@ -192,8 +243,8 @@ public enum ProblemStatus {
192243
NOT_MODIFIED(304, "Not Modified"),
193244

194245
/**
195-
* @deprecated Obsoleted by RFC 7231. "Use Proxy" is no longer recommended.
196246
* @link <a href="https://datatracker.ietf.org/doc/html/rfc7231#section-6.4.5">RFC 7231 §6.4.5</a>
247+
* @deprecated Obsoleted by RFC 7231. "Use Proxy" is no longer recommended.
197248
*/
198249
@Deprecated
199250
USE_PROXY(305, "Use Proxy"),
@@ -320,9 +371,9 @@ public enum ProblemStatus {
320371
/**
321372
* 413 Request Entity Too Large.
322373
*
323-
* @link <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.14">RFC 9110
324-
* §15.5.14</a>
325-
* @deprecated Renamed to {@link #CONTENT_TOO_LARGE} by RFC 8297.
374+
* @link <a href="https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.14">RFC 2616
375+
* §10.4.14</a>
376+
* @deprecated Renamed to {@link #CONTENT_TOO_LARGE} in RFC 9110.
326377
*/
327378
@Deprecated
328379
REQUEST_ENTITY_TOO_LARGE(413, "Request Entity Too Large"),
@@ -338,20 +389,20 @@ public enum ProblemStatus {
338389
/**
339390
* 414 Request URI Too Long.
340391
*
341-
* @link <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.15">RFC 9110
342-
* §15.5.15</a>
392+
* @link <a href="https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.15">RFC 2616
393+
* §10.4.15</a>
343394
* @deprecated Renamed to {@link #URI_TOO_LONG} by RFC 8297.
344395
*/
345396
@Deprecated
346-
REQUEST_URI_TOO_LONG(414, "Request URI Too Long"),
397+
REQUEST_URI_TOO_LONG(414, "Request-URI Too Long"),
347398

348399
/**
349400
* 414 URI Too Long.
350401
*
351402
* @link <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.15">RFC 9110
352403
* §15.5.15</a>
353404
*/
354-
URI_TOO_LONG(414, "Request URI Too Long"),
405+
URI_TOO_LONG(414, "URI Too Long"),
355406

356407
/**
357408
* 415 Unsupported Media Type.
@@ -364,8 +415,8 @@ public enum ProblemStatus {
364415
/**
365416
* 416 Requested Range Not Satisfiable.
366417
*
367-
* @link <a href="https://datatracker.ietf.org/doc/html/rfc9110#section-15.5.17">RFC 9110
368-
* §15.5.17</a>
418+
* @link <a href="https://datatracker.ietf.org/doc/html/rfc2616#section-10.4.17">RFC 2616
419+
* §10.5.17</a>
369420
*/
370421
REQUESTED_RANGE_NOT_SATISFIABLE(416, "Requested Range Not Satisfiable"),
371422

@@ -520,7 +571,11 @@ public enum ProblemStatus {
520571
*/
521572
NOT_EXTENDED(510, "Not Extended"),
522573

523-
/** 511 Network Authentication Required. */
574+
/**
575+
* 511 Network Authentication Required.
576+
*
577+
* @link <a href="https://datatracker.ietf.org/doc/html/rfc6585#section-6">RFC 6585 §6</a>
578+
*/
524579
NETWORK_AUTHENTICATION_REQUIRED(511, "Network Authentication Required");
525580

526581
/**

0 commit comments

Comments
 (0)