Repository: nifi-registry
Updated Branches:
  refs/heads/master 82a23c0c8 -> c8d32fb1d


NIFIREG-65 Using first() instead of last() to get latest


Project: http://git-wip-us.apache.org/repos/asf/nifi-registry/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-registry/commit/c8d32fb1
Tree: http://git-wip-us.apache.org/repos/asf/nifi-registry/tree/c8d32fb1
Diff: http://git-wip-us.apache.org/repos/asf/nifi-registry/diff/c8d32fb1

Branch: refs/heads/master
Commit: c8d32fb1d3aaccc18c06290cea34897304862f2d
Parents: 82a23c0
Author: Bryan Bende <[email protected]>
Authored: Wed Dec 6 15:11:25 2017 -0500
Committer: Bryan Bende <[email protected]>
Committed: Wed Dec 6 15:11:25 2017 -0500

----------------------------------------------------------------------
 .../java/org/apache/nifi/registry/web/api/BucketFlowResource.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-registry/blob/c8d32fb1/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/BucketFlowResource.java
----------------------------------------------------------------------
diff --git 
a/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/BucketFlowResource.java
 
b/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/BucketFlowResource.java
index eac4e9c..c8a8844 100644
--- 
a/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/BucketFlowResource.java
+++ 
b/nifi-registry-web-api/src/main/java/org/apache/nifi/registry/web/api/BucketFlowResource.java
@@ -330,7 +330,7 @@ public class BucketFlowResource extends 
AuthorizableApplicationResource {
             throw new ResourceNotFoundException("Not flow versions found for 
flow with id " + flowId);
         }
 
-        final VersionedFlowSnapshotMetadata lastSnapshotMetadata = 
snapshots.last();
+        final VersionedFlowSnapshotMetadata lastSnapshotMetadata = 
snapshots.first();
 
         final VersionedFlowSnapshot lastSnapshot = 
registryService.getFlowSnapshot(bucketId, flowId, 
lastSnapshotMetadata.getVersion());
         populateLinks(lastSnapshot);

Reply via email to