Return-Path: X-Original-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 202CF9B3C for ; Mon, 10 Sep 2012 14:23:47 +0000 (UTC) Received: (qmail 94163 invoked by uid 500); 10 Sep 2012 14:23:47 -0000 Delivered-To: apmail-jackrabbit-oak-commits-archive@jackrabbit.apache.org Received: (qmail 94133 invoked by uid 500); 10 Sep 2012 14:23:47 -0000 Mailing-List: contact oak-commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: oak-dev@jackrabbit.apache.org Delivered-To: mailing list oak-commits@jackrabbit.apache.org Received: (qmail 94122 invoked by uid 99); 10 Sep 2012 14:23:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 10 Sep 2012 14:23:47 +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, 10 Sep 2012 14:23:44 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2255E23889FD; Mon, 10 Sep 2012 14:23:01 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1382871 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java Date: Mon, 10 Sep 2012 14:23:01 -0000 To: oak-commits@jackrabbit.apache.org From: alexparvulescu@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120910142301.2255E23889FD@eris.apache.org> Author: alexparvulescu Date: Mon Sep 10 14:23:00 2012 New Revision: 1382871 URL: http://svn.apache.org/viewvc?rev=1382871&view=rev Log: OAK-237 Run Jackrabbit query tests Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java?rev=1382871&r1=1382870&r2=1382871&view=diff ============================================================================== --- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java (original) +++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/query/QueryResultImpl.java Mon Sep 10 14:23:00 2012 @@ -18,12 +18,15 @@ */ package org.apache.jackrabbit.oak.jcr.query; +import static org.apache.jackrabbit.oak.commons.PathUtils.concat; +import static org.apache.jackrabbit.oak.commons.PathUtils.isAncestor; +import static org.apache.jackrabbit.oak.commons.PathUtils.relativize; + import org.apache.jackrabbit.commons.iterator.NodeIteratorAdapter; import org.apache.jackrabbit.commons.iterator.RowIteratorAdapter; import org.apache.jackrabbit.oak.api.CoreValue; import org.apache.jackrabbit.oak.api.Result; import org.apache.jackrabbit.oak.api.ResultRow; -import org.apache.jackrabbit.oak.commons.PathUtils; import org.apache.jackrabbit.oak.jcr.NodeDelegate; import org.apache.jackrabbit.oak.jcr.NodeImpl; import org.apache.jackrabbit.oak.jcr.SessionDelegate; @@ -70,7 +73,8 @@ public class QueryResultImpl implements if (path == null) { // a row without path (explain,...) return true; - } else if (PathUtils.isAncestor(pathFilter, path)) { + } + if (isAncestor(pathFilter, path) || pathFilter.equals(path)) { // a row within this workspace return true; } @@ -137,7 +141,7 @@ public class QueryResultImpl implements } String getLocalPath(String path) { - return PathUtils.concat("/", PathUtils.relativize(pathFilter, path)); + return concat("/", relativize(pathFilter, path)); } @Override