Github user wilderrodrigues commented on the pull request:
https://github.com/apache/cloudstack/pull/761#issuecomment-136318482
It has been partially fixed on 4.6, but still the code can be improved
since it might return null. Below an snippet of the 4.6 code:
@Override
public boolean isVmAlive(com.cloud.vm.VirtualMachine vm, Host host)
throws UnknownVM {
Status status = isAgentAlive(host);
if (status == null) {
throw new UnknownVM();
}
return status == Status.Up ? true : null;
}
As you can see, they now throw an Exception in canse the status is null.
However, in the return it might return null. In addition, the return type is no
longer a wrapper class, but a native boolean. Returning null would be very bad.
Could you perhaps make an amalgama of the fix, @remibergsma ? You can then
push it towards 4.4 and 4.6
Cheers,
Wilder
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---