Return-Path: X-Original-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Delivered-To: apmail-jackrabbit-oak-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C4DCD9F6 for ; Wed, 21 Nov 2012 10:43:43 +0000 (UTC) Received: (qmail 13062 invoked by uid 500); 21 Nov 2012 10:43:43 -0000 Delivered-To: apmail-jackrabbit-oak-dev-archive@jackrabbit.apache.org Received: (qmail 13025 invoked by uid 500); 21 Nov 2012 10:43:42 -0000 Mailing-List: contact oak-dev-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-dev@jackrabbit.apache.org Received: (qmail 13004 invoked by uid 99); 21 Nov 2012 10:43:42 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2012 10:43:42 +0000 X-ASF-Spam-Status: No, hits=-0.6 required=5.0 tests=FRT_ADOBE2,RCVD_IN_DNSWL_MED,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [64.18.1.78] (HELO exprod6og127.obsmtp.com) (64.18.1.78) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2012 10:43:33 +0000 Received: from outbound-smtp-2.corp.adobe.com ([193.104.215.16]) by exprod6ob127.postini.com ([64.18.5.12]) with SMTP ID DSNKUKywPwwUBO8vJT99KPpVRIljkhuTmfSF@postini.com; Wed, 21 Nov 2012 02:43:12 PST Received: from inner-relay-4.eur.adobe.com (inner-relay-4b [10.128.4.237]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id qALAhAHP000919 for ; Wed, 21 Nov 2012 02:43:10 -0800 (PST) Received: from nacas01.corp.adobe.com (nacas01.corp.adobe.com [10.8.189.99]) by inner-relay-4.eur.adobe.com (8.12.10/8.12.9) with ESMTP id qALAgxXR016403 for ; Wed, 21 Nov 2012 02:43:09 -0800 (PST) Received: from eurhub01.eur.adobe.com (10.128.4.30) by nacas01.corp.adobe.com (10.8.189.99) with Microsoft SMTP Server (TLS) id 8.3.279.1; Wed, 21 Nov 2012 02:41:20 -0800 Received: from susi.eur.adobe.com (10.132.4.56) by eurhub01.eur.adobe.com (10.128.4.111) with Microsoft SMTP Server id 8.3.279.1; Wed, 21 Nov 2012 10:41:14 +0000 Message-ID: <50ACAFCB.7040708@apache.org> Date: Wed, 21 Nov 2012 11:41:15 +0100 From: =?ISO-8859-1?Q?Michael_D=FCrig?= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Subject: Re: svn commit: r1411900 - in /jackrabbit/oak/trunk/oak-jcr: pom.xml src/main/java/org/apache/jackrabbit/oak/jcr/NodeDelegate.java src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java References: <50AC90E2.1010704@adobe.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org On 21.11.12 11:30, Jukka Zitting wrote: > Hi, > > On Wed, Nov 21, 2012 at 11:13 AM, Thomas Mueller wrote: >> For the query engine, I will need a "validate and normalize path" function >> that verifies a path is syntactically correct, and simplifies it if possible, > > That should be doable in PathUtils as a purely syntactic operation, > something like this: > > String resolvedPath = PathUtils.resolve(originalPath, relativePath); > if (resolvedPath == null) { > throw new Exception("Invalid path"); > } > > Or we could have a convenience method that automatically handles the throwing: > > String resolvedPath = PathUtils.resolveOrThrow(originalPath, relativePath); Normalisation is already done within the PathMapper. I'll follow up with a separate mail with details in a moment. Michael > > BR, > > Jukka Zitting >