cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jburwell <>
Subject [GitHub] cloudstack pull request #1600: Support Backup of Snapshots for Managed Stora...
Date Wed, 31 Aug 2016 21:50:04 GMT
Github user jburwell commented on a diff in the pull request:
    --- Diff: engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/
    @@ -92,7 +90,34 @@
         public SnapshotInfo backupSnapshot(SnapshotInfo snapshotInfo) {
    -        return snapshotInfo;
    +        if (!snapshotInfo.getLocationType().equals(Snapshot.LocationType.SECONDARY))
    --- End diff --
    Since Enum values are guaranteed to be singletons, the `==` is that same as `equals`.
 By changing this check to be ``snapshotInfo.getLocationType() != Snapshot.LocationType.SECONDARY``,
a potential NPE is avoided and the code is more straightforward.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message