jax-rs-spec
  1. jax-rs-spec
  2. JAX_RS_SPEC-408

Use a distance factor when selecting between providers supporting media types

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: spec
    • Labels:
      None

      Description

      First consider the selection of multiple resource methods:

      POST /a
      Content-Type: text/plian
      
      some text
      

      and

      @Consumes("text/*")
      public void m1(String s) {}
      
      @Consumes("text/plain")
      public void m2(String s) {}
      
      

      m2 is obviously selected, due to its distance factor = 0 is less than 1 (d for m1()).

      Now consider two MBR, one with @Consumes(text/*), another one with @Consumes(text/plain) - the latter should also be selected based on the distance factor check.

        Activity

        Hide
        beryozkin_sergey added a comment -

        Resolving as Works As Designed for now

        Show
        beryozkin_sergey added a comment - Resolving as Works As Designed for now

          People

          • Assignee:
            Santiago Pericas-Geertsen
            Reporter:
            beryozkin_sergey
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: