Re: [2.1.10] WildcardHelperTestCase fails
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
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
Bertrand Delacretaz wrote: > On 12/5/06, Alfred Nathaniel <[EMAIL PROTECTED]> 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
On 12/5/06, Alfred Nathaniel <[EMAIL PROTECTED]> 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
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
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/