Well, I will post the quick and dirty patch I made.  Everything compiles and 
tests seem to pass.  However, this patch will work only with the very latest 
version of Spring, and so breaks backward compatibility.  I'll leave it to 
the powers-that-be to determine how they want to approach this situation.  In 
the meantime, this patch should allow anyone on the bleeding edge of Spring 
to continue using Acegi...

  - Andy

On Friday 08 April 2005 04:22 pm, Andy Depue wrote:
> Just so you know, Acegi is not working with the latest cvs version of
> Spring. I'm not sure yet how many problems there are, but I'm currently
> running into the fact that Acegi expects
> org.springframework.util.PathMatcher to contain a static "boolean
> match(String, String)" but PathMatcher is now an interface. I'm currently
> trying to patch my version of Acegi to use an implementation of PathMatcher
> (AntPathMatcher).  This problem is happening in
> PathBasedFilterInvocationDefinitionMap.
>
>   - Andy
>
Index: PathBasedFilterInvocationDefinitionMap.java
===================================================================
RCS file: /cvsroot/acegisecurity/acegisecurity/core/src/main/java/net/sf/acegisecurity/intercept/web/PathBasedFilterInvocationDefinitionMap.java,v
retrieving revision 1.3
diff -u -r1.3 PathBasedFilterInvocationDefinitionMap.java
--- PathBasedFilterInvocationDefinitionMap.java	28 Feb 2005 22:06:53 -0000	1.3
+++ PathBasedFilterInvocationDefinitionMap.java	8 Apr 2005 23:38:13 -0000
@@ -21,6 +21,7 @@
 import org.apache.commons.logging.LogFactory;
 
 import org.springframework.util.PathMatcher;
+import org.springframework.util.AntPathMatcher;
 
 import java.util.HashSet;
 import java.util.Iterator;
@@ -62,6 +63,7 @@
 
     private List requestMap = new Vector();
     private boolean convertUrlToLowercaseBeforeComparison = false;
+    private PathMatcher pathMatcher = new AntPathMatcher();
 
     //~ Methods ================================================================
 
@@ -77,6 +79,16 @@
         return set.iterator();
     }
 
+    public PathMatcher getPathMatcher()
+    {
+      return this.pathMatcher;
+    }
+  
+    public void setPathMatcher(final PathMatcher pathMatcher)
+    {
+      this.pathMatcher = pathMatcher;
+    }
+
     public void setConvertUrlToLowercaseBeforeComparison(
         boolean convertUrlToLowercaseBeforeComparison) {
         this.convertUrlToLowercaseBeforeComparison = convertUrlToLowercaseBeforeComparison;
@@ -113,7 +125,7 @@
         while (iter.hasNext()) {
             EntryHolder entryHolder = (EntryHolder) iter.next();
 
-            boolean matched = PathMatcher.match(entryHolder.getAntPath(), url);
+            boolean matched = getPathMatcher().match(entryHolder.getAntPath(), url);
 
             if (logger.isDebugEnabled()) {
                 logger.debug("Candidate is: '" + url + "'; pattern is "

Reply via email to