You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2017/12/20 01:04:00 UTC
[GitHub] rafaelweingartner commented on a change in pull request #1740: CLOUDSTACK-9572 Snapshot on primary storage not cleaned up after Stor?
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:
users@infra.apache.org
With regards,
Apache Git Services