cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antonio Gallardo <>
Subject Re: Please review changes to WildcardHelper
Date Thu, 01 Jun 2006 22:11:19 GMT
Hi Carsten,

I think we fixed a bug but got another. That is good, because by 
introducing a new test case for the new bug and fixing it, our code get 

Anyhow, here is how to see the new bug in the WildcardMatcher:

1- Open:
2- Click on link "samples" and we get the same page as response.
3-Repeat 2 and you will see the uri is growing and growing to something 

and the result page is the same all the time.

Best Regards,

Antonio Gallardo

Carsten Ziegeler escribió:
> Hi,
> I just fixed the bug in our wildcard helper. The problem was the
> following: if a pattern ends with a constant string (like ".xml")
> and the uri in question contained this constant twice (like
> ("hello.xml.xml") the pattern did not match.
> I added a junit test case for this and now the tests all succeed.
> BUT, while looking at the wildcard helper code, I found several smelling
> code place, like unreachable code etc. which I cleaned up.
> In addition the fix for the bug "seems" to work, but I'm not 100% sure
> if it breaks something else.
> So, it would be great if others can review the code.
> I'm not sure if the code of the wildcard helper is correct at all; I
> guess there are still other cases where the pattern does not match
> although it should. So I think we have to rewrite the code anyway. One
> idea I had is to transform the pattern into a regexp and then use
> one of the regexp libraries for matching.
> Carsten

View raw message