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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 4.5.5.Final
    • 3.9.1.Final, 4.5.1.Final
    • jaxrs
    • None

      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 '&').

              rsearls r searls
              xavierdury Xavier Dury (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: