mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fixed coverity reported concurrency issues
Signed-off-by: Santhosh Edukulla <santhosh.edukulla@gmail.com>
This commit is contained in:
parent
d26e5163d4
commit
e4d6cd8e6a
@ -236,7 +236,7 @@ public abstract class ServerResourceBase implements ServerResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected List<String> getWarnings() {
|
protected List<String> getWarnings() {
|
||||||
synchronized (this) {
|
synchronized (_warnings) {
|
||||||
final ArrayList<String> results = _warnings;
|
final ArrayList<String> results = _warnings;
|
||||||
_warnings = new ArrayList<String>();
|
_warnings = new ArrayList<String>();
|
||||||
return results;
|
return results;
|
||||||
@ -244,7 +244,7 @@ public abstract class ServerResourceBase implements ServerResource {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected List<String> getErrors() {
|
protected List<String> getErrors() {
|
||||||
synchronized (this) {
|
synchronized (_errors) {
|
||||||
final ArrayList<String> result = _errors;
|
final ArrayList<String> result = _errors;
|
||||||
_errors = new ArrayList<String>();
|
_errors = new ArrayList<String>();
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@ -577,21 +577,6 @@ public class AgentManagerImpl extends ManagerBase implements AgentManager, Handl
|
|||||||
return attache;
|
return attache;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean notifyCreatorsOfConnection(StartupCommand[] cmd) throws ConnectionException {
|
|
||||||
boolean handled = false;
|
|
||||||
for (Pair<Integer, StartupCommandProcessor> monitor : _creationMonitors) {
|
|
||||||
if (s_logger.isDebugEnabled()) {
|
|
||||||
s_logger.debug("Sending Connect to creator: " + monitor.second().getClass().getSimpleName());
|
|
||||||
}
|
|
||||||
handled = monitor.second().processInitialConnect(cmd);
|
|
||||||
if (handled) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return handled;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean start() {
|
public boolean start() {
|
||||||
startDirectlyConnectedHosts();
|
startDirectlyConnectedHosts();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user