mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-6712: NPE in findJobInstanceUuid() in ApiDBUtils
This commit is contained in:
parent
ef2012677c
commit
965346cad1
@ -1442,6 +1442,12 @@ public class ApiDBUtils {
|
||||
String jobInstanceId = null;
|
||||
ApiCommandJobType jobInstanceType = EnumUtils.fromString(ApiCommandJobType.class, job.getInstanceType(), ApiCommandJobType.None);
|
||||
|
||||
if (job.getInstanceId() == null) {
|
||||
// when assert is hit, implement 'getInstanceId' of BaseAsyncCmd and return appropriate instance id
|
||||
assert (false);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (jobInstanceType == ApiCommandJobType.Volume) {
|
||||
VolumeVO volume = ApiDBUtils.findVolumeById(job.getInstanceId());
|
||||
if (volume != null) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user