Uploaded image for project: 'Commons Configuration'
  1. Commons Configuration
  2. CONFIGURATION-45

[configuration] Fails silently if asked to save to an invalid filename

    XMLWordPrintableJSON

    Details

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

      Operating System: All
      Platform: All

    • Bugzilla Id:
      32020

      Description

      Running code like this...

      FileConfiguration config = new PropertiesConfiguration();
      config.setFile(new File("/invalid/path/my.properties"));
      config.save();

      ...doesn't throw any Exception. AbstractFileConfiguration.save(File) swallows
      the FileNotFoundException, prints a stack trace, and completes normally,
      without having saved the file.

      Cheers
      Iain Shepherd

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              apache.org@ishepherd.co.uk Iain Shepherd
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: