Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C0A58200D4F for ; Wed, 6 Dec 2017 21:11:51 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id BEF9F160C0A; Wed, 6 Dec 2017 20:11:51 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 0FBA3160BF3 for ; Wed, 6 Dec 2017 21:11:50 +0100 (CET) Received: (qmail 91902 invoked by uid 500); 6 Dec 2017 20:11:50 -0000 Mailing-List: contact commits-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list commits@nifi.apache.org Received: (qmail 91888 invoked by uid 99); 6 Dec 2017 20:11:50 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Dec 2017 20:11:50 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 22EA2E00BD; Wed, 6 Dec 2017 20:11:50 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: bbende@apache.org To: commits@nifi.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: nifi-registry git commit: NIFIREG-65 Using first() instead of last() to get latest Date: Wed, 6 Dec 2017 20:11:50 +0000 (UTC) archived-at: Wed, 06 Dec 2017 20:11:51 -0000 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 Authored: Wed Dec 6 15:11:25 2017 -0500 Committer: Bryan Bende 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);