Uploaded image for project: 'Pluto'
  1. Pluto
  2. PLUTO-583

PortalURLParserImpl: unnecessary "?"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 2.0.0
    • 2.0.2, 2.1.0
    • portal driver
    • None

    Description

      When creating an URL with "public String toString(PortalURL portalURL)" an unnecessary "?" is added if the query is empty (org.apache.pluto.driver.url.impl.PortalURLParserImpl).
      This is the part of the source code where the URL is finally composed:


      // Construct the string representing the portal URL.
      // Fix for PLUTO-247 - check if query string contains parameters
      if ( query.length() > 1 )

      { return buffer.append(query).toString(); }

      // Construct the string representing the portal URL.
      return buffer.append(query).toString();

      There was already a fix for this issue (PLUTO-247). May be this reappeared after some refactoring. The statement in the if-block and the one behind the if-block is the same.
      The unnecessary "?" caused problems when using the URL as action in a form within a HTTPUnit-Test because the testframework does not look at the final character of the URL and adds an additional "?".

      Attachments

        Activity

          People

            ate Ate Douma
            jgahl J├╝rgen Gahl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: