You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gi...@apache.org on 2006/06/23 16:32:03 UTC

svn commit: r416732 - /cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java

Author: giacomo
Date: Fri Jun 23 07:32:03 2006
New Revision: 416732

URL: http://svn.apache.org/viewvc?rev=416732&view=rev
Log:
more fixes (why is this one duplicated here?)

Modified:
    cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java

Modified: cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java?rev=416732&r1=416731&r2=416732&view=diff
==============================================================================
--- cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java (original)
+++ cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java Fri Jun 23 07:32:03 2006
@@ -13,7 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.cocoon.classloader;
+package org.apache.cocoon.util;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -267,12 +267,14 @@
                     return checkEnds(sipat);
                 }
 
-                // Now we need to check whether the litteral substring of the pattern 
-                // is contained in the string somewhere
-                if(apat[ipat] != PATHSEP) {
+                // If we stopped at an other wildcard
+                // we exclude it from being compared
+                if(apat[ipat] == STAR) {
                     ipat--;
                 }
 
+                // Now we need to check whether the litteral substring of the pattern 
+                // is contained in the string somewhere
                 final int l = ipat- sipat + 1;
                 final int sistr = istr;
 
@@ -281,7 +283,7 @@
                 if(istr >= lstr) return false;
 
                 add(new String(astr, sistr, istr - sistr));
-                ipat += l;
+                ipat++;
                 istr += l;
             }
 



Re: svn commit: r416732 - /cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java

Posted by Carsten Ziegeler <cz...@apache.org>.
Giacomo Pati wrote:
> 
> Ok.
> 
> Now, that we are using the new WilcardMatcherHelper utility class, 
> shouldn't we get rid of the WildcardHelper (if possible) as well 
> as its failing test case WildcardHelperTestCase?
> 
Yepp, it is already deprecated in 2.1.x, so we can remove it from 2.2

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/

Re: svn commit: r416732 - /cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java

Posted by Giacomo Pati <gi...@apache.org>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 24 Jun 2006, Carsten Ziegeler wrote:

> Date: Sat, 24 Jun 2006 13:36:40 +0200
> From: Carsten Ziegeler <cz...@apache.org>
> Reply-To: dev@cocoon.apache.org
> To: dev@cocoon.apache.org
> Subject: Re: svn commit: r416732 -
>     /cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classl
>     oader/WildcardMatcherHelper.java
> 
> giacomo@apache.org schrieb:
>> Author: giacomo
>> Date: Fri Jun 23 07:32:03 2006
>> New Revision: 416732
>>
>> URL: http://svn.apache.org/viewvc?rev=416732&view=rev
>> Log:
>> more fixes (why is this one duplicated here?)
>>
> We discussed this recently :) When we switch to OSGi, we can't have two
> bundles exporting the same package. Now while core depends on bootstrap
> it's not possible to put the matcher code into a convenient package in
> bootstrap as this would clash with a package in core. So we decided to
> copy this code as this code should not change that often over time :)

Ok.

Now, that we are using the new WilcardMatcherHelper utility class, 
shouldn't we get rid of the WildcardHelper (if possible) as well 
as its failing test case WildcardHelperTestCase?

- -- 
Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)

iD8DBQFEnYlRLNdJvZjjVZARApIoAKCwm37GNmi2oAboxECGwNghV41ZwQCgs6oG
19S7YQxdv/BiKA9BrEgPZn4=
=XekU
-----END PGP SIGNATURE-----

Re: svn commit: r416732 - /cocoon/trunk/core/cocoon-bootstrap/src/main/java/org/apache/cocoon/classloader/WildcardMatcherHelper.java

Posted by Carsten Ziegeler <cz...@apache.org>.
giacomo@apache.org schrieb:
> Author: giacomo
> Date: Fri Jun 23 07:32:03 2006
> New Revision: 416732
> 
> URL: http://svn.apache.org/viewvc?rev=416732&view=rev
> Log:
> more fixes (why is this one duplicated here?)
> 
We discussed this recently :) When we switch to OSGi, we can't have two
bundles exporting the same package. Now while core depends on bootstrap
it's not possible to put the matcher code into a convenient package in
bootstrap as this would clash with a package in core. So we decided to
copy this code as this code should not change that often over time :)

Carsten

-- 
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/