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

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

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 4.5.5.Final
    • 3.9.1.Final, 4.5.1.Final
    • jaxrs
    • 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 '&').

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: