diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java index 3fc43ea2d87..821c9396e3c 100644 --- a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java @@ -1464,8 +1464,9 @@ public class VolumeServiceImpl implements VolumeService { } // Delete volumes which are not present on DB. - for (Long uniqueName : volumeInfos.keySet()) { - TemplateProp tInfo = volumeInfos.get(uniqueName); + for (Map.Entry entry : volumeInfos.entrySet()) { + Long uniqueName = entry.getKey(); + TemplateProp tInfo = entry.getValue(); //we cannot directly call expungeVolumeAsync here to // reuse delete logic since in this case, our db does not have