websocket-spec
  1. websocket-spec
  2. WEBSOCKET_SPEC-52

Define inheritance semantics for annotations

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Define inheritance semantics for annotations. JSR 250 has guidelines. For e.g
      @WebSocketEndpint
      public Class A {
      }

      public Class B extends A {
      }

      can B be an endpoint etc ? Similarly for all other annotations

        Activity

        Hide
        dannycoward added a comment -

        It seems best to follow the guidelines for JSR 250: the WebSocket annotations only affect the class which carries them. No class that inherits from a WebSocket annotation can 'inherit' the behavior marked by the annotation.

        Show
        dannycoward added a comment - It seems best to follow the guidelines for JSR 250: the WebSocket annotations only affect the class which carries them. No class that inherits from a WebSocket annotation can 'inherit' the behavior marked by the annotation.
        Hide
        dannycoward added a comment -

        We will need to define a deployment error for applications that mistakenly try to use inheritance, and also point out that the SCI scanning will need to discard subclasses of classes marked @WebSocketEndpoint in the scan (currently, such classes will be picked up).

        Show
        dannycoward added a comment - We will need to define a deployment error for applications that mistakenly try to use inheritance, and also point out that the SCI scanning will need to discard subclasses of classes marked @WebSocketEndpoint in the scan (currently, such classes will be picked up).
        Hide
        dannycoward added a comment -

        This is clarified in v012

        Show
        dannycoward added a comment - This is clarified in v012
        Hide
        stepan.kopriva added a comment -

        I was searching for the info in documentation in section 6.2, but I didn't find any restrictions on scanning

        Show
        stepan.kopriva added a comment - I was searching for the info in documentation in section 6.2, but I didn't find any restrictions on scanning
        Hide
        dannycoward added a comment -

        take a look at 4.8 in v012, I'd put a note about scanning there.

        In the v013 I put in a reference to 4.8 from section 6.2. Does that fix it ?

        Show
        dannycoward added a comment - take a look at 4.8 in v012, I'd put a note about scanning there. In the v013 I put in a reference to 4.8 from section 6.2. Does that fix it ?
        Hide
        dannycoward added a comment -

        OK this was already documented about the scan having to throw away subclasses in 4.8. I've also referenced it from 6.2 as well - so I'm closing this one...

        Show
        dannycoward added a comment - OK this was already documented about the scan having to throw away subclasses in 4.8. I've also referenced it from 6.2 as well - so I'm closing this one...

          People

          • Assignee:
            dannycoward
            Reporter:
            jitu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Due:
              Created:
              Updated:
              Resolved: