use of com.cloud.agent.api.BadCommand in project cloudstack by apache.
the class Request method getCommands.
public Command[] getCommands() {
if (_cmds == null) {
try {
StringReader reader = new StringReader(_content);
JsonReader jsonReader = new JsonReader(reader);
jsonReader.setLenient(true);
_cmds = s_gson.fromJson(jsonReader, (Type) Command[].class);
} catch (JsonParseException e) {
_cmds = new Command[] { new BadCommand() };
} catch (RuntimeException e) {
s_logger.error("Caught problem with " + _content, e);
throw e;
}
}
return _cmds;
}
Aggregations