On Mar 7, 2013, at 4:18 PM, Santiago Pericas-Geertsen <santiago.pericasgeertsen_at_Oracle.com> wrote:
>
> On Mar 7, 2013, at 7:17 AM, Sergey Beryozkin <sberyozkin_at_talend.com> wrote:
>
>> Hi
>>
>> We've had a case where a user set a newly built Response on ContainerResponseContext.setEntity(...).
>>
>> Should it cause IllegalArgumentException to minimize the confusion ?
>
> That seems reasonable to me.
I think a better solution is to warn about this in javadoc ...or to do nothing at all... You can never be completely fool-proof and this case is IMO rather marginal. E.g. we do not do anything in the case of ResponseBuilder.entity(...) either and most people don't complain.
Marek
>
> -- Santiago
>