Fixed coverity reported concurrency issues

This commit is contained in:
Santhosh Edukulla 2014-08-06 17:28:49 +05:30
parent 0a7af329f5
commit 6bccf5ff41

View File

@ -66,7 +66,7 @@ public class PropertiesStorage implements StorageComponent {
}
@Override
public boolean configure(String name, Map<String, Object> params) {
public synchronized boolean configure(String name, Map<String, Object> params) {
_name = name;
String path = (String)params.get("path");
if (path == null) {
@ -86,7 +86,6 @@ public class PropertiesStorage implements StorageComponent {
return false;
}
}
try {
PropertiesUtil.loadFromFile(_properties, file);
_file = file;
@ -97,7 +96,6 @@ public class PropertiesStorage implements StorageComponent {
s_logger.error("IOException: ", e);
return false;
}
return true;
}