users@jersey.java.net

Re: [Jersey] Inheritance of Annotations and Jersey?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 09 Jul 2009 12:58:12 +0200

On Jul 9, 2009, at 9:14 AM, Martin Probst wrote:

>> There is a limited form of annotation inheritance, for details see
>> here:
>> [...]
>
> I see.
>
>> The issue you are running into is that you have @Produces on the
>> overriding
>> method which nullifies the @Path on the overridden method.
>
> It's probably set in stone if it's in the spec now,

Yes for 1.x, but not necessarily for 2.x. It would be useful if you
could log an issue at jsr311.dev.java.net so we do not forget your use
case.

For 1.x we opted for a very simple, all or nothing, solution for
method annotation inheritance.

Paul.

> but this doesn't
> seem very useful to me. Having a superclass that defines locations
> (paths) and possible actions in abstract methods, and subclasses that
> define the media type would have been a nice inheritance use case for
> me.
>
> Thanks for the explanation,
> Martin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>