Github user mike-tutkowski commented on a diff in the pull request:

    https://github.com/apache/cloudstack/pull/1735#discussion_r94661240
  
    --- Diff: 
api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java 
---
    @@ -115,8 +115,10 @@ public void execute() {
             List<SnapshotResponse> snapshotResponses = new 
ArrayList<SnapshotResponse>();
             for (Snapshot snapshot : result.first()) {
                 SnapshotResponse snapshotResponse = 
_responseGenerator.createSnapshotResponse(snapshot);
    -            snapshotResponse.setObjectName("snapshot");
    -            snapshotResponses.add(snapshotResponse);
    +            if (snapshotResponse != null) {
    +                snapshotResponse.setObjectName("snapshot");
    --- End diff --
    
    I've added a few comments.
    
    If we implement those comments, then null should not be a problem here (in 
other words, the code in this class could remain unchanged).


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to