You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Dave Brosius <db...@apache.org> on 2007/02/04 10:32:49 UTC
Typo in RangeToken.java - Please check
In org.apache.xerces.impl.xpath.regex.RangeToken.java
in method protected void intersectRanges(Token token)
around line 352
if (src2begin <= src2begin && src1end <= src2end) {
// src1: o--------o
// src2: o------------o
// res: o--------o
// Reuse src2
from the pretty picture, i'd say it should be
if (src2begin <= src1begin && src1end <= src2end) {
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: Typo in RangeToken.java - Please check
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Dave,
I managed to create a test case which hits that code path. I've verified
it works now. That was a good catch. Thanks for the fix.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
"Dave Brosius" <db...@apache.org> wrote on 02/04/2007 11:07:36 PM:
> No, i just saw the src2begin <= src2begin
>
>
> ----- Original Message -----
> From: "Michael Glavassevich" <mr...@ca.ibm.com>
> To: <j-...@xerces.apache.org>
> Sent: Sunday, February 04, 2007 6:55 PM
> Subject: Re: Typo in RangeToken.java - Please check
>
>
> > Dave,
> >
> > "Dave Brosius" <db...@apache.org> wrote on 02/04/2007 04:32:49 AM:
> >
> >> In org.apache.xerces.impl.xpath.regex.RangeToken.java
> >>
> >> in method protected void intersectRanges(Token token)
> >>
> >>
> >> around line 352
> >>
> >> if (src2begin <= src2begin && src1end <= src2end) {
> >> // src1: o--------o
> >> // src2:
o------------o
> >> // res: o--------o
> >> // Reuse src2
> >>
> >>
> >> from the pretty picture, i'd say it should be
> >>
> >> if (src2begin <= src1begin && src1end <= src2end) {
> >
> > I'm not too familiar with this code but based on the comments this
looks
> > right. Do you happen to have a test case to verify it?
> >
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> >> For additional commands, e-mail: j-dev-help@xerces.apache.org
> >
> > Thanks.
> >
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-dev-help@xerces.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: Typo in RangeToken.java - Please check
Posted by Dave Brosius <db...@apache.org>.
No, i just saw the src2begin <= src2begin
----- Original Message -----
From: "Michael Glavassevich" <mr...@ca.ibm.com>
To: <j-...@xerces.apache.org>
Sent: Sunday, February 04, 2007 6:55 PM
Subject: Re: Typo in RangeToken.java - Please check
> Dave,
>
> "Dave Brosius" <db...@apache.org> wrote on 02/04/2007 04:32:49 AM:
>
>> In org.apache.xerces.impl.xpath.regex.RangeToken.java
>>
>> in method protected void intersectRanges(Token token)
>>
>>
>> around line 352
>>
>> if (src2begin <= src2begin && src1end <= src2end) {
>> // src1: o--------o
>> // src2: o------------o
>> // res: o--------o
>> // Reuse src2
>>
>>
>> from the pretty picture, i'd say it should be
>>
>> if (src2begin <= src1begin && src1end <= src2end) {
>
> I'm not too familiar with this code but based on the comments this looks
> right. Do you happen to have a test case to verify it?
>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-dev-help@xerces.apache.org
>
> Thanks.
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
Re: Typo in RangeToken.java - Please check
Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Dave,
"Dave Brosius" <db...@apache.org> wrote on 02/04/2007 04:32:49 AM:
> In org.apache.xerces.impl.xpath.regex.RangeToken.java
>
> in method protected void intersectRanges(Token token)
>
>
> around line 352
>
> if (src2begin <= src2begin && src1end <= src2end) {
> // src1: o--------o
> // src2: o------------o
> // res: o--------o
> // Reuse src2
>
>
> from the pretty picture, i'd say it should be
>
> if (src2begin <= src1begin && src1end <= src2end) {
I'm not too familiar with this code but based on the comments this looks
right. Do you happen to have a test case to verify it?
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-dev-help@xerces.apache.org
Thanks.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org