CLOUDSTACK-3485: NPE while getting instance ID from Asyn Job when

publishing async job events on eventbus

handing case where instance id is null in the asyn job, while publishing
asyn job events on to event bus
This commit is contained in:
Murali Reddy 2013-07-12 13:57:53 +05:30
parent 22c6df0ba2
commit f3a2fc22bf
1 changed files with 3 additions and 1 deletions

View File

@ -1279,9 +1279,11 @@ public class ApiDBUtils {
}
public static String findJobInstanceUuid(AsyncJob job){
if ( job == null )
if ( job == null || job.getInstanceId() == null)
return null;
String jobInstanceId = null;
if (job.getInstanceType() == AsyncJob.Type.Volume) {
VolumeVO volume = ApiDBUtils.findVolumeById(job.getInstanceId());
if (volume != null) {