jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-315

"Note that inheritance of class or interface annotations is not supported" in Spec?

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: spec
    • Labels:
      None

      Description

      Section 3.6 of the spec contains:

      Note that inheritance of class or interface annotations is not supported.

      If the RI does not implement this, it is really good to know (so do not drop it). But this really looks like something from the RI. The Spec. should define behaviour of all implementations, so does it really say that this inheritance type is not supported by any implementation? Quite restrictive, but it might be better told by "MUST NOT BE supported". As this sentence is new in JAXRS 2.0 Spec, I'd assume there might already be JAXRS 1.1 implementations that support the inheritance, and that the sentence means "the inheritance is OPTIONAL". Please clarify.

        Activity

        Hide
        Marek Potociar added a comment -

        IMO, there are no implementations that would support the inheritance and the sentence is here just to clarify. IIRC, this is in line with the overall Java EE annotation inheritance strategy. Personally I would keep the sentence as is - in it's non-normative form. But I'm also fine changing to SHOULD or MUST...

        Show
        Marek Potociar added a comment - IMO, there are no implementations that would support the inheritance and the sentence is here just to clarify. IIRC, this is in line with the overall Java EE annotation inheritance strategy. Personally I would keep the sentence as is - in it's non-normative form. But I'm also fine changing to SHOULD or MUST...
        Hide
        Santiago Pericas-Geertsen added a comment -

        It's an interesting observation. At first glance, I was tempted to add the OPTIONAL clause. However, that requires us to define how it should work if it ISN'T optional. There's isn't a single way in which this type of inheritance can work, so I'm tempted to leave it as is to avoid a new definition. What do you guys think?

        Show
        Santiago Pericas-Geertsen added a comment - It's an interesting observation. At first glance, I was tempted to add the OPTIONAL clause. However, that requires us to define how it should work if it ISN'T optional. There's isn't a single way in which this type of inheritance can work, so I'm tempted to leave it as is to avoid a new definition. What do you guys think?
        Hide
        jan.supol added a comment -

        With respect to the Spec., specifically e.g. Section 2.1 and 2.2., I'd say "Inheritance of class or interface annotations is implementation dependent."

        Show
        jan.supol added a comment - With respect to the Spec., specifically e.g. Section 2.1 and 2.2., I'd say "Inheritance of class or interface annotations is implementation dependent."
        Hide
        Santiago Pericas-Geertsen added a comment -

        I'm leaving the sentence as is, since we are not all in agreement on how it should be changed. IMO, if it isn't supported by the spec, it does not imply that implementations cannot innovate in this area.

        Show
        Santiago Pericas-Geertsen added a comment - I'm leaving the sentence as is, since we are not all in agreement on how it should be changed. IMO, if it isn't supported by the spec, it does not imply that implementations cannot innovate in this area.

          People

          • Assignee:
            Santiago Pericas-Geertsen
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: