Commons Configuration
  1. Commons Configuration
  2. CONFIGURATION-99

[configuration] PropertiesConfiguration doesn't throw exception when path is directory

    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: All

      Description

      When I use a string which is a directory to create a PropertiesConfiguration, no
      exception is thrown. However, the configuration is unusable as it has no
      properties.

      For example, I do

      <code>
      PropertiesConfiguration temp =
      new PropertiesConfiguration("c:/baddirectory");
      </code>

      I get the expected

      <code>
      org.apache.commons.configuration.ConfigurationException: Cannot locate
      configuration source baddirectory
      </code>

      However, when I do

      PropertiesConfiguration temp2 = new
      PropertiesConfiguration("c:/windows");

      I don't get any exception. The difference between "baddirectory" and "windows"
      is that the former doesn't exist and the latter does.

        Activity

        Hide
        Emmanuel Bourg added a comment -

        Thank you for reporting this issue, it's now fixed in SVN. Feel free to download
        the next nightly build and check if it works for you.

        Show
        Emmanuel Bourg added a comment - Thank you for reporting this issue, it's now fixed in SVN. Feel free to download the next nightly build and check if it works for you.
        Hide
        Moran Ben-David added a comment -

        I took the trunk from svn and this issue is fixed. Thank you so much.

        Show
        Moran Ben-David added a comment - I took the trunk from svn and this issue is fixed. Thank you so much.

          People

          • Assignee:
            Unassigned
            Reporter:
            Moran Ben-David
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development