rafaelweingartner commented on a change in pull request #1740: CLOUDSTACK-9572 
Snapshot on primary storage not cleaned up after Stor?
URL: https://github.com/apache/cloudstack/pull/1740#discussion_r157915732
 
 

 ##########
 File path: 
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java
 ##########
 @@ -64,6 +64,24 @@ public SnapshotInfo getSnapshot(DataObject obj, DataStore 
store) {
         return so;
     }
 
+    @Override
+    public List<SnapshotInfo> getSnapshots(long volumeId, DataStoreRole role) {
+
+        SnapshotDataStoreVO snapshotStore = 
snapshotStoreDao.findByVolume(volumeId, role);
+        if (snapshotStore == null) {
+            return null;
 
 Review comment:
   This will cause a NPE. Consider returning an empty list.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to