Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1398

Incorrect warning logs because of "multiple endpoints" while in fact it is one.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.18.Final
    • 3.0.17.Final
    • None
    • None
    • Hide

      Create a simple GET method, that produces MediaType.TEXT_PLAIN. Fire a request that accepts "text/plain, text/, */".

      Show
      Create a simple GET method, that produces MediaType.TEXT_PLAIN. Fire a request that accepts "text/plain, text/ , */ ".

      Follow up of https://issues.jboss.org/browse/RESTEASY-1300

      I have a method that produces

      @Produces(MediaType.TEXT_PLAIN)
      

      A request comes in with Accept header

      Accept: text/plain, text/*, */*
      

      This is parsed as three acceptMedia, so this loop is executed three times. Because of that the match is added three times, and because of that the warning triggers, filling up our logs.

      Idea for a fix: Check the unique number of destinations, before printing the warning. In my code, the three matches (based on media type) all point to the same method in the same resource. The warning should only be printed if we have to choose between multiple methods I think.

              thofman Tomas Hofman
              alexnederlof Alex Nederlof (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: