Author: jbq
Date: Wed Feb 21 03:12:50 2007
New Revision: 509966

URL: http://svn.apache.org/viewvc?view=rev&rev=509966
Log:
Port the following change from branch 1.x:

Convert '/'s in ignore string to 'file.separator' property value, else matches
fail on Windows, files aren't ignored & the tests fail.

See http://svn.apache.org/viewvc?view=rev&revision=489623

Modified:
    
incubator/wicket/trunk/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java

Modified: 
incubator/wicket/trunk/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java
URL: 
http://svn.apache.org/viewvc/incubator/wicket/trunk/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java?view=diff&rev=509966&r1=509965&r2=509966
==============================================================================
--- 
incubator/wicket/trunk/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java
 (original)
+++ 
incubator/wicket/trunk/wicket/src/main/java/wicket/util/license/ApacheLicenseHeaderTestCase.java
 Wed Feb 21 03:12:50 2007
@@ -24,6 +24,7 @@
 import java.util.Map;
 
 import junit.framework.TestCase;
+import wicket.util.string.Strings;
 
 /**
  * Testcase used in the different wicket projects for testing for the correct
@@ -133,6 +134,11 @@
 
                        if (pathname.isDirectory())
                        {
+                               String relativePathname = 
pathname.getAbsolutePath();
+                               relativePathname = 
Strings.replaceAll(relativePathname,
+                                               baseDirectory.getAbsolutePath() 
+ System.getProperty("file.separator"), "")
+                                               .toString();
+                               if (relativePathname.equals("target") == false) 
{
                                boolean found = false;
                                for (String ignore : ignoreDirectory)
                                {
@@ -145,6 +151,7 @@
                                if (found == false)
                                {
                                        accept = true;
+                               }
                                }
                        }
 


Reply via email to