Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7625

JAX-RS 2.1 TCK: UriBuilder doesn't handle case where "port" is not an integer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.1
    • 3.2.2
    • JAX-RS
    • None
    • Unknown

    Description

      The JAX-RS 2.1 TCK (which isn't public in EE4J yet, but once it is, I'll post a link) has a test that checks the String content of a call to URI.toString().  The URI contains what looks like an HTTP URL, but does not specify an integer for the port - it uses a string instead.  While debugging this, the "host" and "port" portion of the URI is passed in as scheme specific part, and the host field is null and the port field is -1.  

      The UriBuilderImpl creates the URI object, this scheme specific part is lost, so when the user (test) calls uri.toString(), they do not see that info.  Here is an example:

      String uriString = "myscheme://not.really.a.host:fakePort/";URI uri = UriBuilder.fromUri(uriString).build();assertEquals(uriString, uri.toString());

       

       

      Attachments

        Issue Links

          Activity

            People

              andymc Andrew J McMurry
              andymc Andrew J McMurry
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: