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

UriBuilder.replaceQueryParam() leaves trailing '&' and '?'

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 3.9.1.Final, 4.5.1.Final
    • Fix Version/s: 4.5.5.Final
    • Component/s: jaxrs
    • Labels:
      None

      Description

      When using UriBuilder.replaceQueryParam() to remove query parameters, trailing '?' and '&' may remain in the produced URI.

      UriBuilder.fromUri("http://example.com/api?foo=bar").replaceQueryParam("foo").build(); // gives http://example.com/api?
      UriBuilder.fromUri("http://example.com/api?foo=bar&foobar=qux").replaceQueryParam("foo").build(); // gives http://example.com/api?foobar=qux&
      

      I tested with Jersey which gives correct URIs (without '?' and '&').

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rsearls r searls
                Reporter:
                xdury Xavier Dury
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: