Skip to content

Commit 6bccf5f

Browse files
committed
Fixed coverity reported concurrency issues
1 parent 0a7af32 commit 6bccf5f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public synchronized void persist(String key, String value) {
6666
}
6767

6868
@Override
69-
public boolean configure(String name, Map<String, Object> params) {
69+
public synchronized boolean configure(String name, Map<String, Object> params) {
7070
_name = name;
7171
String path = (String)params.get("path");
7272
if (path == null) {
@@ -86,7 +86,6 @@ public boolean configure(String name, Map<String, Object> params) {
8686
return false;
8787
}
8888
}
89-
9089
try {
9190
PropertiesUtil.loadFromFile(_properties, file);
9291
_file = file;
@@ -97,7 +96,6 @@ public boolean configure(String name, Map<String, Object> params) {
9796
s_logger.error("IOException: ", e);
9897
return false;
9998
}
100-
10199
return true;
102100
}
103101

0 commit comments

Comments
 (0)