Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-105

[configuration] setUrl and getUrl for FileConfiguration are incorrect

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      We use XMLConfiguration to store our application user preferences.
      the preferences are persisted in a FileManager, which delivers the files using
      the HTTP protocol.
      As each user has its own preferences, the URL we use to get the preferences is :

      http://server/ContentAcces?id=<the_id>&session=<session_id>

      As the code of setUrl in AbstractFileConfiguration is :

      public void setURL(URL url)

      { setBasePath(ConfigurationUtils.getBasePath(url)); setFileName(ConfigurationUtils.getFileName(url)); }

      the request parameters of the URL are not stored in the URL, and when getUrl is
      called, null is returned, because the composed URL (http://server/ContentAcces)
      cannot be opened.

        Activity

        Henri Yandell made changes -
        Component/s Configuration [ 12311107 ]
        Project Commons [ 12310458 ] Commons Configuration [ 12310467 ]
        Key COM-2639 CONFIGURATION-105
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s unspecified [ 12311647 ]
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 37886 12342791
        Hide
        Oliver Heger added a comment -

        You are right, this is a bug. In setURL() it was simply forgotten to store the
        URL. Thanks for spotting this. Should now be fixed in SVN.

        Show
        Oliver Heger added a comment - You are right, this is a bug. In setURL() it was simply forgotten to store the URL. Thanks for spotting this. Should now be fixed in SVN.
        Etienne Lacazedieu created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Etienne Lacazedieu
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development