users@jersey.java.net

[Jersey] Re: Response.getStatus() and code readability

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Tue, 12 Nov 2013 17:01:24 -0500

On 12/11/2013 9:37 AM, Julian Reschke wrote:
> I assume you mean "custom status codes"?
>
> Anyway: the answer is that HTTP status codes are extensible, so making
> this an enum is a bug.

That's fair, though I would point out that it would be possible to
return CUSTOM or UNKNOWN for unknown codes. This would allow users to
produce readable code and still fall back on a secondary switch (for
custom status codes) or int.

Gili