Return-Path: X-Original-To: apmail-jackrabbit-commits-archive@www.apache.org Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 80A2510513 for ; Mon, 30 Sep 2013 13:50:11 +0000 (UTC) Received: (qmail 34886 invoked by uid 500); 30 Sep 2013 13:50:01 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 34672 invoked by uid 500); 30 Sep 2013 13:49:57 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 34584 invoked by uid 99); 30 Sep 2013 13:49:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Sep 2013 13:49:54 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Sep 2013 13:49:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id E69AC23888A6; Mon, 30 Sep 2013 13:49:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1527567 - /jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java Date: Mon, 30 Sep 2013 13:49:20 -0000 To: commits@jackrabbit.apache.org From: ard@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20130930134920.E69AC23888A6@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ard Date: Mon Sep 30 13:49:20 2013 New Revision: 1527567 URL: http://svn.apache.org/r1527567 Log: JCR-3673 make sure indexIsValid never gets called with NO_MORE_DOCS Modified: jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java Modified: jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java?rev=1527567&r1=1527566&r2=1527567&view=diff ============================================================================== --- jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java (original) +++ jackrabbit/branches/2.6/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/ChildAxisQuery.java Mon Sep 30 13:49:20 2013 @@ -430,12 +430,13 @@ class ChildAxisQuery extends Query imple calculateChildren(); nextDoc = hits.skipTo(target); - while (nextDoc > -1 && !indexIsValid(nextDoc)) { - nextDoc(); - } if (nextDoc < 0) { nextDoc = NO_MORE_DOCS; } + + while (nextDoc != NO_MORE_DOCS && !indexIsValid(nextDoc)) { + nextDoc(); + } return nextDoc; }