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

RestEasyUriBuilder.host does not accept null to reset host per JavaDoc

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.0.5.Final
    • 3.0.4.Final
    • jaxrs
    • None
    • Hide

      @Inject UriInfo uriInfo;
      uriInfo.getRequestUriBuilder().scheme(null).host(null).port(-1);

      Show
      @Inject UriInfo uriInfo; uriInfo.getRequestUriBuilder().scheme(null).host(null).port(-1);
    • Compatibility/Configuration

      The JavaDoc for UriBuilder.host states that "A null value will unset the host component of the URI",
      however the ResteasyUriBuilder throws IllegalArgumentException "schemeSpecificPart was null" when host value is null.

      This is useful to create a relative URI for the request.

            patriot1burke@gmail.com Bill Burke (Inactive)
            jbarrett_jira Jacob Barrett (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: