jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1375928 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/query/XPathQueryEvaluator.java
Date Wed, 22 Aug 2012 08:03:40 GMT
Author: mduerig
Date: Wed Aug 22 08:03:39 2012
New Revision: 1375928

URL: http://svn.apache.org/viewvc?rev=1375928&view=rev
Log:
OAK-268: XPathQueryEvaluator generates incorrect XPath query
 Thanks Chetan Mehrotra for the patch

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/query/XPathQueryEvaluator.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/query/XPathQueryEvaluator.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/query/XPathQueryEvaluator.java?rev=1375928&r1=1375927&r2=1375928&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/query/XPathQueryEvaluator.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/security/user/query/XPathQueryEvaluator.java
Wed Aug 22 08:03:39 2012
@@ -17,6 +17,7 @@
 package org.apache.jackrabbit.oak.jcr.security.user.query;
 
 import java.util.Iterator;
+
 import javax.annotation.Nonnull;
 import javax.jcr.Node;
 import javax.jcr.PropertyType;
@@ -131,13 +132,13 @@ public class XPathQueryEvaluator impleme
     @Override
     public void visit(Condition.Node condition) throws RepositoryException {
         xPath.append('(')
-                .append("jcr:like(")
+                .append("jcr:like(@")
                 .append(namePathMapper.getJcrName(UserConstants.REP_PRINCIPAL_NAME))
                 .append(",'")
                 .append(condition.getPattern())
                 .append("')")
                 .append(" or ")
-                .append("jcr:like(fn:name(.),'")
+                .append("jcr:like(fn:name(),'")
                 .append(escape(condition.getPattern()))
                 .append("')")
                 .append(')');



Mime
View raw message