Uploaded image for project: 'Tuscany'
  1. Tuscany
  2. TUSCANY-3996

Relative binding URIs not handled correctly when non-default root is specified

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • Java-SCA-2.x
    • Java-SCA-2.x
    • SCA Java Runtime
    • None
    • All

    Description

      There is code in the BindingURIBuilder as follows....

      if (baseURI == null) {
      if (componentURI == null) {
      if (bindingURI != null)

      { uriString = name + "/" + bindingURI.toString(); }

      else

      { uriString = name; }

      } else {
      if (bindingURI != null) {
      if (bindingURI.toString().startsWith("/"))

      { uriString = componentURI.resolve(bindingURI).toString(); }

      else

      { uriString = componentURI.resolve(name + "/" + bindingURI).toString(); }

      } else

      { uriString = componentURI.resolve(name).toString(); }

      }
      } else {
      if (componentURI == null) {
      if (bindingURI != null)

      { uriString = basedURI(baseURI, bindingURI).toString(); }

      else

      { uriString = basedURI(baseURI, URI.create(name)).toString(); }

      } else {
      if (bindingURI != null)

      { uriString = basedURI(baseURI, componentURI.resolve(bindingURI)).toString(); }

      else

      { uriString = basedURI(baseURI, componentURI.resolve(name)).toString(); }

      }
      }

      Note that the branch where baseURI is non-null behaves differently w.r.t. adding name to the final URI compared to when baseURI is null.

      Attachments

        Activity

          People

            simonslaws Simon Laws
            simonslaws Simon Laws
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: