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

Thread safety for file based configurations

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None

      Description

      When autoSave is enabled on a FileConfiguration it's quite frequent to run into a ConcurrentModificationException, simply because setProperty is called from a thread while another thread is saving the configuration.

      I suggest to leverage the ReadWriteLock in Java 5 to solve this issue. The read lock is acquired in getProperty(), and the write lock is acquired in setProperty().

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                ebourg Emmanuel Bourg
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: