You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Dan Diephouse <da...@mulesource.com> on 2009/07/08 01:05:22 UTC

Problem with JCR-977 patch/r791737

Just an FYI, I had a problem with my version of the patch and
the PredicateDerefQuery.rewrite function. It caused Jackrabbit to get caught
in an infinite loop on me. Changing the function to just return "this" all
the time seems to fix things, but I'm not sure if it's the right fix or not.
Looking at the commit here:
http://svn.apache.org/viewvc?view=rev&revision=791737 it looks like that
change might apply here as well.
Thoughts?
Dan

-- 
Dan Diephouse
http://mulesource.com | http://netzooid.com/blog

Re: Problem with JCR-977 patch/r791737

Posted by Marcel Reutegger <ma...@gmx.net>.
On Wed, Jul 8, 2009 at 01:05, Dan Diephouse<da...@mulesource.com> wrote:
> Just an FYI, I had a problem with my version of the patch and
> the PredicateDerefQuery.rewrite function. It caused Jackrabbit to get caught
> in an infinite loop on me. Changing the function to just return "this" all
> the time seems to fix things, but I'm not sure if it's the right fix or not.

ah, right. good catch. but the change should rather be:

Index: src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java
===================================================================
--- src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java	(revision
792113)
+++ src/main/java/org/apache/jackrabbit/core/query/lucene/PredicateDerefQuery.java	(working
copy)
@@ -140,7 +140,7 @@
         if (cQuery == subQuery) {
             return this;
         } else {
-            return new PredicateDerefQuery(subQuery, refProperty,
nameTest, version, nsMappings);
+            return new PredicateDerefQuery(cQuery, refProperty,
nameTest, version, nsMappings);
         }
     }

I'll fix that.

regards
 marcel