> Internally ResponseBuilder only uses the int value, see the
> implementation of ResponseBuilder.status(Status). There are methods to
> set the status code using int and Response.getStatus returns an int.
> Response.Status is only provided as a convenience and shouldn't
> prevent use of other status codes.
Yes, certainly one can do that. But see how ugly it is:
ResponseBuilder.status(Response.Status.OK)
compared to
ResponseBuilder.status(WebDavResponse.Status.getInt())
and especielly
ResponseBuilder.ok()
The first one feels intuitive, the second one feels like C++. :-(
Isn't convenience the top idea of the builder API? So if we remove
convenience, then what is left over that is any better than directly writing
"return new Response(200, "OK");" ?
Regards
Markus