I see that
Response.ok(entity).build();
returns Response via ResponseBuilder, and that it is a common pattern to arrive at the target object(Response in this case) through an intermediate object(ResponseBuilder). Why is it so? Why not directly do something like:
ResponseBuilder.one-step-ok-build(entity);
Aucun commentaire:
Enregistrer un commentaire