From dev-return-10574-archive-asf-public=cust-asf.ponee.io@gora.apache.org Tue May 1 07:53:16 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id AFAD8180645 for ; Tue, 1 May 2018 07:53:15 +0200 (CEST) Received: (qmail 57410 invoked by uid 500); 1 May 2018 05:53:13 -0000 Mailing-List: contact dev-help@gora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@gora.apache.org Delivered-To: mailing list dev@gora.apache.org Received: (qmail 57395 invoked by uid 99); 1 May 2018 05:53:12 -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; Tue, 01 May 2018 05:53:12 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 30103E061B; Tue, 1 May 2018 05:53:12 +0000 (UTC) From: nishadi To: dev@gora.apache.org Reply-To: dev@gora.apache.org References: In-Reply-To: Subject: [GitHub] gora pull request #132: Gora-444 : Add #size() to Result API Content-Type: text/plain Message-Id: <20180501055312.30103E061B@git1-us-west.apache.org> Date: Tue, 1 May 2018 05:53:12 +0000 (UTC) Github user nishadi commented on a diff in the pull request: https://github.com/apache/gora/pull/132#discussion_r185170628 --- Diff: gora-core/src/main/java/org/apache/gora/memory/store/MemStore.java --- @@ -92,7 +92,9 @@ public boolean nextInner() throws IOException { @Override public int size() { - return map.navigableKeySet().size(); + int totalSize = map.navigableKeySet().size(); + int intLimit = (int)this.limit; + return intLimit > 0 && totalSize>intLimit ? intLimit : totalSize; --- End diff -- Please reformat the code with desired spacing. ---