<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -21,18 +21,17 @@
  */
 package org.jboss.test.deployers.vfs.structure.modified.support;
 
-import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VirtualFile;
+import org.jboss.deployers.vfs.spi.structure.modified.AbstractPathNameFilter;
 
 /**
  * Include only .xml files.
  *
  * @author &lt;a href=&quot;mailto:ales.justin@jboss.com&quot;&gt;Ales Justin&lt;/a&gt;
  */
-public class XmlIncludeVirtualFileFilter implements VirtualFileFilter
+public class XmlIncludeVirtualFileFilter extends AbstractPathNameFilter
 {
-   public boolean accepts(VirtualFile file)
+   public boolean accepts(String path)
    {
-      return file.getName().endsWith(&quot;.xml&quot;);
+      return path.endsWith(&quot;.xml&quot;);
    }
 }
\ No newline at end of file</diff>
      <filename>deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/XmlIncludeVirtualFileFilter.java</filename>
    </modified>
    <modified>
      <diff>@@ -51,6 +51,8 @@ public abstract class AbstractSynchTest extends BootstrapDeployersTest
 
       MetaDataStructureModificationChecker mdsmc = new MetaDataStructureModificationChecker(mainDeployerStructure);
       mdsmc.setFilter(filter);
+      mdsmc.start();
+
       SynchWrapperModificationChecker synch = new SynchWrapperModificationChecker(mdsmc, synchAdapter);
 
       VisitorAttributes attributes = new VisitorAttributes();</diff>
      <filename>deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java</filename>
    </modified>
    <modified>
      <diff>@@ -21,12 +21,13 @@
  */
 package org.jboss.test.deployers.vfs.structure.modified.test;
 
+import java.io.BufferedWriter;
 import java.io.File;
-import java.io.IOException;
 import java.io.FileOutputStream;
-import java.io.BufferedWriter;
+import java.io.IOException;
 import java.io.OutputStreamWriter;
 import java.net.URI;
+import java.net.URL;
 
 import junit.framework.Test;
 import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
@@ -34,9 +35,9 @@ import org.jboss.deployers.vfs.spi.structure.modified.OverrideSynchAdapter;
 import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
 import org.jboss.deployers.vfs.spi.structure.modified.SynchAdapter;
 import org.jboss.test.deployers.vfs.structure.modified.support.XmlIncludeVirtualFileFilter;
+import org.jboss.virtual.VFSUtils;
 import org.jboss.virtual.VirtualFile;
 import org.jboss.virtual.VirtualFileFilter;
-import org.jboss.virtual.VFSUtils;
 
 /**
  * Test file synch.
@@ -66,9 +67,17 @@ public class SynchModificationTestCase extends AbstractSynchTest
       {
          public boolean accepts(VirtualFile file)
          {
-            String path = file.getPathName();
-            // only wars, but not its classes
-            return (path.contains(&quot;.war&quot;) &amp;&amp; path.contains(&quot;/WEB-INF&quot;) == false);
+            try
+            {
+               URL url = file.toURL();
+               String path = url.toExternalForm();
+               // only wars, but not its classes
+               return (path.contains(&quot;.war&quot;) &amp;&amp; path.contains(&quot;/WEB-INF/classes&quot;) == false);
+            }
+            catch (Exception e)
+            {
+               throw new RuntimeException(e);
+            }
          }
       };
    }
@@ -137,6 +146,28 @@ public class SynchModificationTestCase extends AbstractSynchTest
          assertFalse(checker.hasStructureBeenModified(originalRoot));
          assertEquals(tempTimestamp, tempProps.getLastModified());
 
+         // add new file into WEB-INF
+         VirtualFile webInfo = originalRoot.getChild(&quot;WEB-INF&quot;);
+         File webInfFile = new File(VFSUtils.getCompatibleURI(webInfo));
+         File newWebInfFile = newFile(webInfFile, &quot;newfile.txt&quot;);
+         try
+         {
+            assertNull(tempRoot.getChild(&quot;WEB-INF/newfile.txt&quot;));
+            assertFalse(checker.hasStructureBeenModified(originalRoot));
+            assertNotNull(tempRoot.getChild(&quot;WEB-INF/newfile.txt&quot;));
+            assertFalse(checker.hasStructureBeenModified(originalRoot));
+
+            // try deleting this one now
+            assertTrue(newWebInfFile.delete());
+            assertFalse(checker.hasStructureBeenModified(originalRoot));
+            assertNull(tempRoot.getChild(&quot;WEB-INF/newfile.txt&quot;));
+         }
+         finally
+         {
+            if (newWebInfFile.exists())
+               assertTrue(newWebInfFile.delete());
+         }
+
          // check we don't update for nothing
          @SuppressWarnings(&quot;deprecation&quot;)
          VirtualFile xhtml = tempRoot.findChild(&quot;test.xhtml&quot;);
@@ -145,7 +176,6 @@ public class SynchModificationTestCase extends AbstractSynchTest
          Thread.sleep(1500l);
          assertFalse(checker.hasStructureBeenModified(originalRoot));
          assertEquals(xhtmlTimestamp, xhtml.getLastModified());
-
       }
       finally
       {</diff>
      <filename>deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>a0bc7355f2dc5f54f4b6c42d7876411d91dbc862</id>
    </parent>
  </parents>
  <author>
    <name>alesj</name>
    <email>alesj@84be2c1e-ba19-0410-b317-a758671a6fc1</email>
  </author>
  <url>http://github.com/bobmcwhirter/jboss-deployers/commit/856aaef132fc25e2f3a0fd5b4732f0e74cf857b3</url>
  <id>856aaef132fc25e2f3a0fd5b4732f0e74cf857b3</id>
  <committed-date>2009-06-12T03:51:15-07:00</committed-date>
  <authored-date>2009-06-12T03:51:15-07:00</authored-date>
  <message>[JBDEPLOY-192]; metadata + synch overlap test.

git-svn-id: http://anonsvn.jboss.org/repos/jbossas/projects/jboss-deployers/trunk@90149 84be2c1e-ba19-0410-b317-a758671a6fc1</message>
  <tree>4af18fd9c60a235cfc33dcb8b084a127db69e08f</tree>
  <committer>
    <name>alesj</name>
    <email>alesj@84be2c1e-ba19-0410-b317-a758671a6fc1</email>
  </committer>
</commit>
