Uploaded image for project: 'Wink'
  1. Wink
  2. WINK-95

HttpMethod annotation behaivor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.1
    • 0.1
    • Common
    • None

    Description

      In the JavaDoc for @HttpMethod, it says:

      "It is an error for a method to be annotated with more than one annotation that is annotated with HttpMethod."

      I think we should at least issue a warning if we don't outright fail here. I imagine that a user will try to put @POST and @PUT methods on a method. I think the design restriction was to force users to think heavily and not abuse the HTTP Methods.

      Also, I think in ResourceMetadataCollector.getHttpMethod(Method method) :

              HttpMethod httpMethod = method.getAnnotation(HttpMethod.class);
              if (httpMethod != null) {
                  return httpMethod;
              }
      

      The above is not necessary.

      Attachments

        Activity

          People

            nfischer Nadav Fischer
            bluk Bryant Luk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: