[jboss-cvs] JBossAS SVN: r87102 - in projects/jboss-deployers/trunk: deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test and 19 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Apr 9 18:17:47 EDT 2009


Author: alesj
Date: 2009-04-09 18:17:47 -0400 (Thu, 09 Apr 2009)
New Revision: 87102

Added:
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EarTempStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/WarTempStructure.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/META-INF/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/META-INF/application.properties
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/META-INF/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/META-INF/ejb-jar.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/some.properties
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/classes/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/classes/some.properties
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/web.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.jsp
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.xhtml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/classes/
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/classes/some.properties
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/web.xml
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.jsp
   projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.xhtml
Modified:
   projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java
   projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java
Log:
[JBAS-6722]; initial synch tests.

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EarTempStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EarTempStructure.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/EarTempStructure.java	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.structure.modified.support;
+
+import org.jboss.deployers.spi.structure.ContextInfo;
+import org.jboss.deployers.spi.structure.ModificationType;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer;
+
+/**
+ * Temping ear.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class EarTempStructure extends MockEarStructureDeployer
+{
+   protected void applyContextInfo(StructureContext context, ContextInfo result)
+   {
+      super.applyContextInfo(context, result);
+      result.setModificationType(ModificationType.TEMP);
+   }
+}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/WarTempStructure.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/WarTempStructure.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/support/WarTempStructure.java	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.structure.modified.support;
+
+import org.jboss.deployers.vfs.plugins.structure.war.WARStructure;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.deployers.spi.structure.ContextInfo;
+import org.jboss.deployers.spi.structure.ModificationType;
+
+/**
+ * Temping war.
+ * 
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class WarTempStructure extends WARStructure
+{
+   protected void applyContextInfo(StructureContext context, ContextInfo result)
+   {
+      super.applyContextInfo(context, result);
+      result.setModificationType(ModificationType.TEMP);
+   }
+}

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java (from rev 86822, projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/AbstractSynchTest.java	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.structure.modified.test;
+
+import org.jboss.deployers.structure.spi.main.MainDeployerStructure;
+import org.jboss.deployers.vfs.spi.structure.modified.MetaDataStructureModificationChecker;
+import org.jboss.deployers.vfs.spi.structure.modified.StructureModificationChecker;
+import org.jboss.deployers.vfs.spi.structure.modified.SynchAdapter;
+import org.jboss.deployers.vfs.spi.structure.modified.SynchWrapperModificationChecker;
+import org.jboss.test.deployers.BootstrapDeployersTest;
+import org.jboss.virtual.VirtualFileFilter;
+import org.jboss.virtual.VisitorAttributes;
+
+/**
+ * AbstractSynchTest.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public abstract class AbstractSynchTest extends BootstrapDeployersTest
+{
+   protected AbstractSynchTest(String name)
+   {
+      super(name);
+   }
+
+   protected StructureModificationChecker createStructureModificationChecker()
+   {
+      MainDeployerStructure mainDeployerStructure = getMainDeployerStructure();
+      VirtualFileFilter filter = createFilter();
+      VirtualFileFilter recurseFilter = createRecurseFilter();
+      SynchAdapter synchAdapter = createSynchAdapter();
+
+      MetaDataStructureModificationChecker mdsmc = new MetaDataStructureModificationChecker(mainDeployerStructure);
+      mdsmc.setFilter(filter);
+      SynchWrapperModificationChecker synch = new SynchWrapperModificationChecker(mdsmc, synchAdapter);
+
+      VisitorAttributes attributes = new VisitorAttributes();
+      attributes.setLeavesOnly(true);
+      attributes.setRecurseFilter(recurseFilter);
+      synch.setAttributes(attributes);
+
+      return synch;
+   }
+
+   protected abstract VirtualFileFilter createFilter();
+
+   protected abstract VirtualFileFilter createRecurseFilter();
+
+   protected abstract SynchAdapter createSynchAdapter();
+}
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java	2009-04-09 21:00:30 UTC (rev 87101)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/StructureModificationTest.java	2009-04-09 22:17:47 UTC (rev 87102)
@@ -42,7 +42,7 @@
 
    protected StructureModificationChecker createStructureModificationChecker()
    {
-      MainDeployerStructure mainDeployer = assertBean("MainDeployer", MainDeployerStructure.class);
+      MainDeployerStructure mainDeployer = getMainDeployerStructure();
       VirtualFileFilter filter = createFilter();
       return createStructureModificationChecker(mainDeployer, filter);
    }

Copied: projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java (from rev 86822, projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.java)
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/java/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.java	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,102 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.deployers.vfs.structure.modified.test;
+
+import junit.framework.Test;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+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.VirtualFile;
+import org.jboss.virtual.VirtualFileFilter;
+
+/**
+ * Test file synch.
+ *
+ * @author <a href="mailto:ales.justin at jboss.org">Ales Justin</a>
+ */
+public class SynchModificationTestCase extends AbstractSynchTest
+{
+   public SynchModificationTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(SynchModificationTestCase.class);
+   }
+
+   protected VirtualFileFilter createFilter()
+   {
+      return new XmlIncludeVirtualFileFilter();
+   }
+
+   protected VirtualFileFilter createRecurseFilter()
+   {
+      return new VirtualFileFilter()
+      {
+         public boolean accepts(VirtualFile file)
+         {
+            String path = file.getPathName();
+            // only wars, but not its classes
+            return (path.contains(".war") && path.contains("/WEB-INF") == false);
+         }
+      };
+   }
+
+   protected SynchAdapter createSynchAdapter()
+   {
+      return new OverrideSynchAdapter();
+   }
+
+   public void testWAR() throws Exception
+   {
+      VFSDeploymentUnit deploymentUnit = assertDeploy("/synch/war", "simple.war");
+      try
+      {
+         VirtualFile root = deploymentUnit.getRoot();
+         StructureModificationChecker checker = createStructureModificationChecker();
+         assertFalse(checker.hasStructureBeenModified(root));
+      }
+      finally
+      {
+         undeploy(deploymentUnit);
+      }
+   }
+
+   public void testEAR() throws Exception
+   {
+      VFSDeploymentUnit deploymentUnit = assertDeploy("/synch/ear", "simple.ear");
+      try
+      {
+         VirtualFile root = deploymentUnit.getRoot();
+         StructureModificationChecker checker = createStructureModificationChecker();
+         assertFalse(checker.hasStructureBeenModified(root));
+      }
+      finally
+      {
+         undeploy(deploymentUnit);
+      }
+   }
+}
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/MetaDataStructureModificationTestCase.xml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,6 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.ear.support.MockEarStructureDeployer"/>
+  <bean name="WarStructure" class="org.jboss.test.deployers.vfs.structure.war.support.MockWarStructureDeployer"/>
+
+</deployment>

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/org/jboss/test/deployers/vfs/structure/modified/test/SynchModificationTestCase.xml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,6 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+  <bean name="EarStructure" class="org.jboss.test.deployers.vfs.structure.modified.support.EarTempStructure"/>
+  <bean name="WarStructure" class="org.jboss.test.deployers.vfs.structure.modified.support.WarTempStructure"/>
+
+</deployment>

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/META-INF/application.properties
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/META-INF/application.properties	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/META-INF/application.properties	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1,2 @@
+jar-module=ejb.jar
+web-module=ui.war

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/META-INF/ejb-jar.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/META-INF/ejb-jar.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/META-INF/ejb-jar.xml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+<ejb/>
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/some.properties
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/some.properties	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ejb.jar/some.properties	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+test=123

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/classes/some.properties
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/classes/some.properties	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/classes/some.properties	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+test=123

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/web.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/web.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/WEB-INF/web.xml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+<web/>
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.jsp
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.jsp	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.jsp	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+Some jsp.

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.xhtml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.xhtml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/ear/simple.ear/ui.war/test.xhtml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+<html/>
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/classes/some.properties
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/classes/some.properties	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/classes/some.properties	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+test=123

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/web.xml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/web.xml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/WEB-INF/web.xml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+<web/>
\ No newline at end of file

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.jsp
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.jsp	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.jsp	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+Some jsp.

Added: projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.xhtml
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.xhtml	                        (rev 0)
+++ projects/jboss-deployers/trunk/deployers-vfs/src/test/resources/synch/war/simple.war/test.xhtml	2009-04-09 22:17:47 UTC (rev 87102)
@@ -0,0 +1 @@
+<html/>
\ No newline at end of file

Modified: projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java
===================================================================
--- projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java	2009-04-09 21:00:30 UTC (rev 87101)
+++ projects/jboss-deployers/trunk/deployers-vfs-spi/src/main/java/org/jboss/deployers/vfs/spi/structure/modified/UpdateDeleteVisitor.java	2009-04-09 22:17:47 UTC (rev 87102)
@@ -41,30 +41,33 @@
          throw new IllegalArgumentException("Null original root");
 
       this.originalRoot = originalRoot;
-      this.initialPath = originalRoot.getPathName();
+      initialPath = originalRoot.getPathName();
+      if (initialPath.endsWith("/") == false)
+         initialPath += "/";
    }
 
    protected void doVisit(VirtualFile file) throws Exception
    {
-      String pathName = initialPath + file.getPathName();
+      String pathName = file.getPathName();
+      String originalPathName = initialPath + pathName;
       VirtualFile child = originalRoot.getChild(pathName);
       if (child == null)
       {
          // original was deleted, try deleting the temp
          if (getSynchAdapter().delete(file))
          {
-            getCache().removeCache(pathName);
+            getCache().removeCache(originalPathName);
          }
       }
       else
       {
-         Long previous = getCache().getCacheValue(pathName);
+         Long previous = getCache().getCacheValue(originalPathName);
          long lastModified = child.getLastModified();
          if (previous != null && lastModified > previous)
          {
             lastModified = getSynchAdapter().update(file, child);
          }
-         getCache().putCacheValue(pathName, lastModified);
+         getCache().putCacheValue(originalPathName, lastModified);
       }
    }
 }
\ No newline at end of file




More information about the jboss-cvs-commits mailing list