jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ard Schrijvers" <a.schrijv...@hippo.nl>
Subject RE: Re: AIOOBE in ChildAxisScorer in jackrabbit trunk
Date Tue, 04 Sep 2007 09:51:49 GMT

> Christoph Kiehl wrote:
> I made some changes to the ChildAxisScorer while working on JCR-1041. 
> Unfortunately I don't have the time right now to check if I 
> introduced this bug. 
> I'll try to have a look later this day. Feel free to check 
> the affected revisions.

When reverting to revision before these changes the problem did not occur. The problem appears
to be, that in 
ChildAxisQuery.ChildAxisScorer.skiptTo(int) the skipTo(target) can return -1 (leading to problem
in reader.document(i) where i = -1 ). adding

   if(nextDoc == -1) {
      return false;
after nextDoc in the code snippet below solves the problem. But, I am not sure wether it should
be avoided in the skipTo in the first place? 
public boolean skipTo(int target) throws IOException {
     nextDoc = hits.skipTo(target);
     while (!indexIsValid(nextDoc))
     return nextDoc > -1;            

WDYT? Shall I re-open the JCR-1041?

Regards Ard

> Cheers,
> Christoph

View raw message