jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
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
Date Wed, 21 Nov 2012 10:30:05 GMT

On Wed, Nov 21, 2012 at 11:13 AM, Thomas Mueller <mueller@adobe.com> 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);


Jukka Zitting

View raw message