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

UriBuilderImpl#clone does not clone leadingSlash

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3, 2.2.11
    • 2.2.12, 2.3.1, 2.4
    • JAX-RS
    • None
    • Novice

    Description

      When cloning a UriBuilderImpl the URI which results from a clone can be different from the URI which would result from the original builder if the path contains a leading slash. The reason for this is that the leading slash is not cloned with the rest of the URI and thus is not retained in the new builder.

              UriBuilder builder = new UriBuilderImpl(new URI("/this/is/my/path"));
              assertEquals(builder.build(), builder.clone().build()); // assertion fails
      

      unit.framework.AssertionFailedError: expected:</this/is/my/path> but was:<this/is/my/path>

      Attachments

        Activity

          People

            sergey_beryozkin Sergey Beryozkin
            alexwen Alex Wenckus
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: