users@jax-rs-spec.java.net

[jax-rs-spec users] Re: Adding links using ContainerResponseFilter

From: Santiago Pericas-Geertsen <Santiago.PericasGeertsen_at_oracle.com>
Date: Tue, 19 Feb 2013 09:24:02 -0500

On Feb 19, 2013, at 7:17 AM, Jan Kronquist <jan.kronquist_at_jayway.com> wrote:

> Hi
>
> I am experimenting using a ContainerResponseFilter to add additional links using reflection. However, in Jersey2.0-m12-1 it is not possible to modify the links since the set is unmodifyable. The javadocs of ContainerResponseContext.getLinks does not indicate that the list is not modifyable. Is this the intended behavior?
>
> In that case what is the purpose of the ContainerResponseContext.getLinkBuilder method?
>
> Is it possible to add links using some other mechanism?

 I need to double-check this, but we certainly want to support this use case. Perhaps getLinks should return a mutable set ...

-- Santiago