diff options
author | snowleo <schneeleo@gmail.com> | 2012-04-11 22:51:34 +0300 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-04-11 22:51:34 +0300 |
commit | c9e64d9e46c3e97b4be897b4449fdad667753d8e (patch) | |
tree | 8c592486e2029d729cd7f751dd4d9d5b25d9bda9 | |
parent | 4c8d0ea2d995cc97ffde6a00d5de206100f22958 (diff) | |
download | Essentials-c9e64d9e46c3e97b4be897b4449fdad667753d8e.tar Essentials-c9e64d9e46c3e97b4be897b4449fdad667753d8e.tar.gz Essentials-c9e64d9e46c3e97b4be897b4449fdad667753d8e.tar.lz Essentials-c9e64d9e46c3e97b4be897b4449fdad667753d8e.tar.xz Essentials-c9e64d9e46c3e97b4be897b4449fdad667753d8e.zip |
Prevent that a config file is loaded/saved by more than one thread.
-rw-r--r-- | Essentials/src/com/earth2me/essentials/EssentialsConf.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/EssentialsConf.java b/Essentials/src/com/earth2me/essentials/EssentialsConf.java index 85c2bbd8c..b2cb1fd12 100644 --- a/Essentials/src/com/earth2me/essentials/EssentialsConf.java +++ b/Essentials/src/com/earth2me/essentials/EssentialsConf.java @@ -39,7 +39,7 @@ public class EssentialsConf extends YamlConfiguration this.configFile = configFile; } - public void load() + public synchronized void load() { configFile = configFile.getAbsoluteFile(); if (!configFile.getParentFile().exists()) @@ -356,7 +356,7 @@ public class EssentialsConf extends YamlConfiguration } @Override - public void save(final File file) throws IOException + public synchronized void save(final File file) throws IOException { if (file == null) { |