Hi,
On Wed, Nov 21, 2012 at 11:13 AM, Thomas Mueller <[email protected]> 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);
BR,
Jukka Zitting