Tuscany
  1. Tuscany
  2. TUSCANY-3996

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: Java-SCA-2.x
    • Fix Version/s: Java-SCA-2.x
    • Component/s: SCA Java Runtime
    • Labels:
      None
    • Environment:
      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.

        Activity

        Simon Laws made changes -
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Simon Laws made changes -
        Field Original Value New Value
        Assignee Simon Laws [ simonslaws ]
        Simon Laws created issue -

          People

          • Assignee:
            Simon Laws
            Reporter:
            Simon Laws
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development