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

Method invoked but no HttpMethod

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.1
    • 0.1
    • Server
    • None

    Description

      If a non-HttpMethod annotated annotation is not present but a JAX-RS regular annotation is present, then the method will get invoked for any matching method. wink-server/EncodedTest will fail one test because of this but ran into it during one of the integration tests.

      @Path("/abcd")
      public class Resource {
      
        @Produces("text/plain")
        public Response invokeMeAnytime() {
        }
      }
      

      Invoke a GET to /abcd with Accept header of text/plain.

      The problem is with a) Method metadata records are added to the root resource even if there isn't a HttpMethod (which is the easy if check fix) and b) the filtering HTTP method algorithm assumes that if you don't have a HttpMethod, you must be a subresource locator I think.

      The real fix to me is to get rid of the Set returned of HttpMethod since it is not possible with JAX-RS to have a method be annotated with greater than 1 @HttpMethod annotated annotations.

      I consider this a must fix for 0.1 so I'll go ahead and mark it that way.

      Attachments

        1. WINK-103.patch
          8 kB
          Jesse A. Ramos

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: