You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bertrand Delacretaz <bd...@apache.org> on 2006/12/05 08:56:39 UTC
[2.1.10] WildcardHelperTestCase fails
Just tried to run the junit tests on BRANCH_2_1_X, and the second
assertion in WildcardHelperTestCase fails:
public void testEndPattern() throws Exception {
final Map resultMap = new HashMap();
final String pattern = "*/";
final int[] expr = WildcardHelper.compilePattern(pattern);
boolean result = WildcardHelper.match(resultMap, "foo/bar/", expr);
// this one passes
assertFalse("Url 'foo/bar/' should not match pattern '*/'.", result);
// this one fails
result = WildcardHelper.match(resultMap, "test/foo/bar/", expr);
assertFalse("Url 'test/foo/bar/' should not match pattern
'*/'.", result);
result = WildcardHelper.match(resultMap, "foo/", expr);
assertTrue("Url 'foo/' should match pattern '*/'", result);
IIUC, this is related to http://tinyurl.com/ydvkcb , but Carsten says
in that thread that the bug has been fixed. Any clues?
(environment: macosx 10.4.8, JDK 1.5.0_06)
-Bertrand
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase
fails)
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Alfred Nathaniel wrote:
> Here we go: I propose to delete the obsolete
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java and the related test case.
+1
Vadim
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase
fails)
Posted by Ralph Goers <Ra...@dslextreme.com>.
Alfred Nathaniel wrote:
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java and the related test case.
>
> Please cast your votes.
>
> Cheers, Alfred.
>
>
> Here we go: I propose to delete the obsolete
+0
Ralph
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase fails)
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 12/8/06, Alfred Nathaniel <an...@apache.org> wrote:
> Here we go: I propose to delete the obsolete
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java and the related test case.
+1
-Bertrand
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase
fails)
Posted by Joerg Heinicke <jo...@gmx.de>.
On 08.12.2006 22:38, Alfred Nathaniel wrote:
> I propose to delete the obsolete
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java
> and the related test case.
+1
Jörg
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase
fails)
Posted by Antonio Gallardo <ag...@agssa.net>.
Alfred Nathaniel escribió:
> Here we go: I propose to delete the obsolete
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java and the related test case.
>
> Please cast your votes.
>
+1
Please new time start a vote in a new thread. :)
Best Regards,
Antonio Gallardo.
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase fails)
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Dec 8, 2006, at 1:38 PM, Alfred Nathaniel wrote:
> Here we go: I propose to delete the obsolete
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/
> WildcardHelper.java and the related test case.
>
> Please cast your votes.
+1
(non-binding, if that matters for this vote :-)
WildcardHelper is not part of a published API, so IMHO anyone that
depends on it knows that they do so at their own risk. Alfred says
it's easy to switch to WildcardMatcherHelper, and if it were really
true that someone out there is actually relying on bugs of
WildcardMatcher, they could always exhume the source code and copy it
to their own package, and keep using it that way.
cheers,
—ml—
Re: VOTE: delete WildcardHelper from 2.1.x (was [2.1.10] WildcardHelperTestCase
fails)
Posted by Carsten Ziegeler <cz...@apache.org>.
Alfred Nathaniel wrote:
>
> Here we go: I propose to delete the obsolete
> BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java and the related test case.
>
> Please cast your votes.
>
+1
Carsten
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
VOTE: delete WildcardHelper from 2.1.x (was [2.1.10]
WildcardHelperTestCase fails)
Posted by Alfred Nathaniel <an...@apache.org>.
On Fri, 2006-12-08 at 08:13 +0100, Carsten Ziegeler wrote:
> > WildcardHelper is now no longer used in 2.1. Should we remove it
> > together with WildcardHelperTestCase?
> >
> > That breaks private Cocoon components which may still use it but IMHO
> > that is better than just giving a depracation warning. ("Friends don't
> > let friends use broken WildcardHelper.")
> >
> > WildcardMatcherHelper is not a drop-in replacement of WildcardHelper but
> > easy enough to use.
> >
> > WDYT?
> >
> Hmm, yes, this seems logical - on the other hand there might be people
> relying on the bugs in the code :)
>
> I think you should start a vote on this and hopefully we get the buggy
> code out of 2.1.10.
>
> Carsten
Here we go: I propose to delete the obsolete
BRANCH_2_1_X/src/java/org/apache/cocoon/matching/helpers/WildcardHelper.java and the related test case.
Please cast your votes.
Cheers, Alfred.
Re: [2.1.10] WildcardHelperTestCase fails
Posted by Carsten Ziegeler <cz...@apache.org>.
Alfred Nathaniel wrote:
> On Wed, 2006-12-06 at 08:34 +0100, Carsten Ziegeler wrote:
>
>> Ok, I removed the usage of the deprecated matching code and replaced it
>> with using the new matcher. In addition I removed the duplicate test
>> case for the WildcardHelper class and commented out the failing test
>> in the remaining test case.
>
> Thanks Carsten,
>
> WildcardHelper is now no longer used in 2.1. Should we remove it
> together with WildcardHelperTestCase?
>
> That breaks private Cocoon components which may still use it but IMHO
> that is better than just giving a depracation warning. ("Friends don't
> let friends use broken WildcardHelper.")
>
> WildcardMatcherHelper is not a drop-in replacement of WildcardHelper but
> easy enough to use.
>
> WDYT?
>
Hmm, yes, this seems logical - on the other hand there might be people
relying on the bugs in the code :)
I think you should start a vote on this and hopefully we get the buggy
code out of 2.1.10.
Carsten
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: [2.1.10] WildcardHelperTestCase fails
Posted by Alfred Nathaniel <an...@apache.org>.
On Wed, 2006-12-06 at 08:34 +0100, Carsten Ziegeler wrote:
> Ok, I removed the usage of the deprecated matching code and replaced it
> with using the new matcher. In addition I removed the duplicate test
> case for the WildcardHelper class and commented out the failing test
> in the remaining test case.
Thanks Carsten,
WildcardHelper is now no longer used in 2.1. Should we remove it
together with WildcardHelperTestCase?
That breaks private Cocoon components which may still use it but IMHO
that is better than just giving a depracation warning. ("Friends don't
let friends use broken WildcardHelper.")
WildcardMatcherHelper is not a drop-in replacement of WildcardHelper but
easy enough to use.
WDYT?
Cheers, Alfred.
Re: [2.1.10] WildcardHelperTestCase fails
Posted by Carsten Ziegeler <cz...@apache.org>.
Bertrand Delacretaz wrote:
> On 12/5/06, Alfred Nathaniel <an...@apache.org> wrote:
>
>> ...Also there are two distinct copies of WildcardHelperTestCase in
>> src/test/org/apache/cocoon/util/test and
>> src/test/org/apache/cocoon/matching/helpers which both should go...
>
> You mean remove the test cases? I wouldn't do that unless the tested
> classes are not used anymore.
>
> Right now, we could just comment out the failing test, which would
> have failed on previous releases anyway IIUC (the
> WildcardHelperTestCase didn't exist in 2.1.9).
>
Ok, I removed the usage of the deprecated matching code and replaced it
with using the new matcher. In addition I removed the duplicate test
case for the WildcardHelper class and commented out the failing test
in the remaining test case.
Carsten
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/
Re: [2.1.10] WildcardHelperTestCase fails
Posted by Bertrand Delacretaz <bd...@apache.org>.
On 12/5/06, Alfred Nathaniel <an...@apache.org> wrote:
> ...Also there are two distinct copies of WildcardHelperTestCase in
> src/test/org/apache/cocoon/util/test and
> src/test/org/apache/cocoon/matching/helpers which both should go...
You mean remove the test cases? I wouldn't do that unless the tested
classes are not used anymore.
Right now, we could just comment out the failing test, which would
have failed on previous releases anyway IIUC (the
WildcardHelperTestCase didn't exist in 2.1.9).
-Bertrand
Re: [2.1.10] WildcardHelperTestCase fails
Posted by Alfred Nathaniel <an...@apache.org>.
On Tue, 2006-12-05 at 11:02 +0100, Carsten Ziegeler wrote:
> Afaik, the code for the wildcard helper has been replaced after that by
> someone else.
>
> Carsten
> Bertrand Delacretaz wrote:
> > Just tried to run the junit tests on BRANCH_2_1_X, and the second
> > assertion in WildcardHelperTestCase fails:
> >
> > public void testEndPattern() throws Exception {
WildcardHelper is rotten and has been deprecated in favor of
WildcardMatcherHelper.
However, WildcardHelper is still used by CocoonBean and portal's
UserRightService. Anyone who knows these two classes and could clean
them out?
Also there are two distinct copies of WildcardHelperTestCase in
src/test/org/apache/cocoon/util/test and
src/test/org/apache/cocoon/matching/helpers which both should go.
Cheers, Alfred.
Re: [2.1.10] WildcardHelperTestCase fails
Posted by Carsten Ziegeler <cz...@apache.org>.
Afaik, the code for the wildcard helper has been replaced after that by
someone else.
Carsten
Bertrand Delacretaz wrote:
> Just tried to run the junit tests on BRANCH_2_1_X, and the second
> assertion in WildcardHelperTestCase fails:
>
> public void testEndPattern() throws Exception {
> final Map resultMap = new HashMap();
> final String pattern = "*/";
> final int[] expr = WildcardHelper.compilePattern(pattern);
> boolean result = WildcardHelper.match(resultMap, "foo/bar/", expr);
>
> // this one passes
> assertFalse("Url 'foo/bar/' should not match pattern '*/'.", result);
>
> // this one fails
> result = WildcardHelper.match(resultMap, "test/foo/bar/", expr);
> assertFalse("Url 'test/foo/bar/' should not match pattern
> '*/'.", result);
>
> result = WildcardHelper.match(resultMap, "foo/", expr);
> assertTrue("Url 'foo/' should match pattern '*/'", result);
>
> IIUC, this is related to http://tinyurl.com/ydvkcb , but Carsten says
> in that thread that the bug has been fixed. Any clues?
>
> (environment: macosx 10.4.8, JDK 1.5.0_06)
>
> -Bertrand
>
--
Carsten Ziegeler - Chief Architect
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/