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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.0.17.Final
    • Fix Version/s: 3.0.18.Final
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      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/ , */ ".

      Description

      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  thofman Tomas Hofman
                  Reporter:
                  alexnederlof Alex Nederlof
                • Votes:
                  1 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: